Skip to contentSkip to conversation

powerpc: Use str_on_off() helper in check_cache_coherency()

PATCH RESEND In review Thorsten Blum 2 participants 2 messages Dec 20, 2024 – Dec 23, 2024 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 powerpc: Use str_on_off() helper in check_cache_coherency()

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

---
 arch/powerpc/kernel/setup-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/setup-common.c +2 -2
index 6fa179448c33..f7d7a93f07fc 100644
@@ -834,8 +834,8 @@ static int __init check_cache_coherency(void)
 	if (devtree_coherency != KERNEL_COHERENCY) {
 		printk(KERN_ERR
 			"kernel coherency:%s != device tree_coherency:%s\n",
-			KERNEL_COHERENCY ? "on" : "off",
-			devtree_coherency ? "on" : "off");
+			str_on_off(KERNEL_COHERENCY),
+			str_on_off(devtree_coherency));
 		BUG();
 	}
 
Signature · 1 line
2.47.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Thorsten Blum

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

---
 arch/powerpc/kernel/setup-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/setup-common.c +0 -0
index 6fa179448c33..f7d7a93f07fc 100644

arch/powerpc/kernel/setup-common.c static int __init check_cache_coherency(void) · line 840

Quoted 9 lines
arch/powerpc/kernel/setup-common.c +2 -2
@@ -834,8 +834,8 @@ static int __init check_cache_coherency(void)
 	if (devtree_coherency != KERNEL_COHERENCY) {
 		printk(KERN_ERR
 			"kernel coherency:%s != device tree_coherency:%s\n",
-			KERNEL_COHERENCY ? "on" : "off",
-			devtree_coherency ? "on" : "off");
+			str_on_off(KERNEL_COHERENCY),
+			str_on_off(devtree_coherency));
 		BUG();
 	}

Looks good to me. Please feel free to add -

-ritesh