]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: cb710-mmc: Convert ternary operator to str_plural() helper
authorLi Dong <lidong@vivo.com>
Wed, 18 Jun 2025 11:59:54 +0000 (19:59 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Jun 2025 10:43:26 +0000 (12:43 +0200)
Replace direct ternary condition check with existing helper function
str_plural() to improve code readability and maintain consistency.

Signed-off-by: Li Dong <lidong@vivo.com>
Link: https://lore.kernel.org/r/20250618115954.10260-1-lidong@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/cb710-mmc.c

index 8787e7f49e944dd828e371d3c7f1e8f82e661e44..448d2f9159eab4bd41345b701eb1d273d6fe5c78 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/delay.h>
+#include <linux/string_choices.h>
 #include "cb710-mmc.h"
 
 #define CB710_MMC_REQ_TIMEOUT_MS       2000
@@ -215,7 +216,7 @@ static void cb710_mmc_set_transfer_size(struct cb710_slot *slot,
                ((count - 1) << 16)|(blocksize - 1));
 
        dev_vdbg(cb710_slot_dev(slot), "set up for %zu block%s of %zu bytes\n",
-               count, count == 1 ? "" : "s", blocksize);
+               count, str_plural(count), blocksize);
 }
 
 static void cb710_mmc_fifo_hack(struct cb710_slot *slot)