]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: Convert ternary operator to str_true_false() helper
authorLi Dong <lidong@vivo.com>
Fri, 20 Jun 2025 04:35:17 +0000 (12:35 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 3 Jul 2025 10:35:17 +0000 (12:35 +0200)
Replace direct ternary condition check with existing helper function
str_true_false() to improve code readability and maintain consistency.

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

index c885c04e938ad17fb7a68f0e010e97887a52b23d..381944dc74993e14f1a82096024af39a22189c1d 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm/cacheflush.h>
 #include <asm/io.h>
 #include <linux/unaligned.h>
+#include <linux/string_choices.h>
 
 #define ATMCI_MAX_NR_SLOTS     2
 
@@ -2264,7 +2265,7 @@ static int atmci_init_slot(struct atmel_mci *host,
                "slot[%u]: bus_width=%u, detect_pin=%d, "
                "detect_is_active_high=%s, wp_pin=%d\n",
                id, slot_data->bus_width, desc_to_gpio(slot_data->detect_pin),
-               !gpiod_is_active_low(slot_data->detect_pin) ? "true" : "false",
+               str_true_false(!gpiod_is_active_low(slot_data->detect_pin)),
                desc_to_gpio(slot_data->wp_pin));
 
        mmc->ops = &atmci_ops;