Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: Convert ternary operator to str_true_false() helper

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>

authored by

Li Dong and committed by
Ulf Hansson
31c2e10c b93d8b1c

+2 -1
+2 -1
drivers/mmc/host/atmel-mci.c
··· 38 38 #include <asm/cacheflush.h> 39 39 #include <asm/io.h> 40 40 #include <linux/unaligned.h> 41 + #include <linux/string_choices.h> 41 42 42 43 #define ATMCI_MAX_NR_SLOTS 2 43 44 ··· 2265 2264 "slot[%u]: bus_width=%u, detect_pin=%d, " 2266 2265 "detect_is_active_high=%s, wp_pin=%d\n", 2267 2266 id, slot_data->bus_width, desc_to_gpio(slot_data->detect_pin), 2268 - !gpiod_is_active_low(slot_data->detect_pin) ? "true" : "false", 2267 + str_true_false(!gpiod_is_active_low(slot_data->detect_pin)), 2269 2268 desc_to_gpio(slot_data->wp_pin)); 2270 2269 2271 2270 mmc->ops = &atmci_ops;