Thread (4 messages) 4 messages, 3 authors, 2025-01-15

Re: [PATCH v2] clk: Use str_enable_disable-like helpers

From: Stanislav Jakubek <hidden>
Date: 2025-01-15 07:21:58
Also in: linux-arm-msm, linux-clk, lkml

Hi Krzysztof, 1 note below.

On Tue, Jan 14, 2025 at 08:06:12PM +0100, Krzysztof Kozlowski wrote:
Replace ternary (condition ? "enable" : "disable") syntax with helpers
from string_choices.h because:
[snip]
quoted hunk ↗ jump to hunk
diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index 06245681dac7..f3a73ac5a1b9 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -17,6 +17,7 @@
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/spinlock.h>
+#include <linux/string_choices.h>
 #include <linux/reboot.h>
 
 /*
@@ -116,9 +117,9 @@ static void __init nomadik_src_init(void)
 
 	val = readl(src_base + SRC_XTALCR);
 	pr_info("SXTALO is %s\n",
-		(val & SRC_XTALCR_SXTALDIS) ? "disabled" : "enabled");
+		str_enabled_disabled(val & SRC_XTALCR_SXTALDIS));
It seems like you flipped the logic here. Was this intentional?

Regards,
Stanislav
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help