linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers
@ 2025-01-17 11:46 Thorsten Blum
  2025-05-18  3:44 ` Madhavan Srinivasan
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-01-17 11:46 UTC (permalink / raw)
  To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Naveen N Rao
  Cc: Thorsten Blum, linuxppc-dev, linux-kernel

Remove hard-coded strings by using the str_enabled_disabled() and
str_on_off() helper functions.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/powerpc/platforms/powermac/setup.c | 4 ++--
 arch/powerpc/platforms/powermac/time.c  | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 6de1cd5d8a58..e119ced05d10 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -45,6 +45,7 @@
 #include <linux/root_dev.h>
 #include <linux/bitops.h>
 #include <linux/suspend.h>
+#include <linux/string_choices.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
 
@@ -238,8 +239,7 @@ static void __init l2cr_init(void)
 				_set_L2CR(0);
 				_set_L2CR(*l2cr);
 				pr_info("L2CR overridden (0x%x), backside cache is %s\n",
-					*l2cr, ((*l2cr) & 0x80000000) ?
-					"enabled" : "disabled");
+					*l2cr, str_enabled_disabled((*l2cr) & 0x80000000));
 			}
 			of_node_put(np);
 			break;
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index 8633891b7aa5..b4426a35aca3 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/param.h>
 #include <linux/string.h>
+#include <linux/string_choices.h>
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/time.h>
@@ -77,7 +78,7 @@ long __init pmac_time_init(void)
 		delta |= 0xFF000000UL;
 	dst = ((pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x8) & 0x80) != 0);
 	printk("GMT Delta read from XPRAM: %d minutes, DST: %s\n", delta/60,
-		dst ? "on" : "off");
+		str_on_off(dst));
 #endif
 	return delta;
 }
-- 
2.48.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers
  2025-01-17 11:46 [PATCH] powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers Thorsten Blum
@ 2025-05-18  3:44 ` Madhavan Srinivasan
  0 siblings, 0 replies; 2+ messages in thread
From: Madhavan Srinivasan @ 2025-05-18  3:44 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy, Naveen N Rao,
	Thorsten Blum
  Cc: linuxppc-dev, linux-kernel

On Fri, 17 Jan 2025 12:46:20 +0100, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_enabled_disabled() and
> str_on_off() helper functions.
> 
> 

Applied to powerpc/next.

[1/1] powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers
      https://git.kernel.org/powerpc/c/f36a28192e3cbef6952c1b82d4ef78f26a0d2cad

Thanks


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-18  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 11:46 [PATCH] powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers Thorsten Blum
2025-05-18  3:44 ` Madhavan Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).