bus: uniphier-system-bus: Use str_on_off() helper in uniphier_system_bus_check_boot_swap()

shao.mingyin at zte.com.cn shao.mingyin at zte.com.cn
Wed May 28 19:22:00 PDT 2025


From: Shao Mingyin <shao.mingyin at zte.com.cn>

Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Shao Mingyin <shao.mingyin at zte.com.cn>
---
 drivers/bus/uniphier-system-bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
index cb5c89ce7b86..ee8e432a5277 100644
--- a/drivers/bus/uniphier-system-bus.c
+++ b/drivers/bus/uniphier-system-bus.c
@@ -10,6 +10,7 @@
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
+#include <linux/string_choices.h>

 /* System Bus Controller registers */
 #define UNIPHIER_SBC_BASE	0x100	/* base address of bank0 space */
@@ -120,7 +121,7 @@ static void uniphier_system_bus_check_boot_swap(

 	is_swapped = !(readl(base_reg) & UNIPHIER_SBC_BASE_BE);

-	dev_dbg(priv->dev, "Boot Swap: %s\n", is_swapped ? "on" : "off");
+	dev_dbg(priv->dev, "Boot Swap: %s\n", str_on_off(is_swapped));

 	/*
 	 * If BOOT_SWAP was asserted on power-on-reset, the CS0 and CS1 are
-- 
2.25.1



More information about the linux-arm-kernel mailing list