[RESEND PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()

Thorsten Blum posted 1 patch 12 months ago
arch/powerpc/kernel/setup-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[RESEND PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()
Posted by Thorsten Blum 12 months ago
Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/powerpc/kernel/setup-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 6fa179448c33..f7d7a93f07fc 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -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();
 	}
 
-- 
2.47.1
Re: [RESEND PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()
Posted by Ritesh Harjani (IBM) 11 months, 4 weeks ago
Thorsten Blum <thorsten.blum@linux.dev> writes:

> Remove hard-coded strings by using the str_on_off() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  arch/powerpc/kernel/setup-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 6fa179448c33..f7d7a93f07fc 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -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 - 
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

-ritesh