lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202505291022003179-UwGRHwJQ-a0Mox6S2Gg@zte.com.cn>
Date: Thu, 29 May 2025 10:22:00 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <hayashi.kunihiko@...ionext.com>
Cc: <mhiramat@...nel.org>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <yang.yang29@....com.cn>,
        <xu.xin16@....com.cn>, <yang.tao172@....com.cn>,
        <ye.xingchen@....com.cn>
Subject: bus: uniphier-system-bus: Use str_on_off() helper in uniphier_system_bus_check_boot_swap()

From: Shao Mingyin <shao.mingyin@....com.cn>

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

Signed-off-by: Shao Mingyin <shao.mingyin@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ