Re: [PATCH 7/7] powerpc: fix a problematic usage of WARN()

2015-11-25 Thread Michael Ellerman
On Wed, 2015-11-25 at 21:12 +0800, Geliang Tang wrote:
> WARN() takes a condition and a format string. The condition was
> omitted. So I added it.
> 
> Signed-off-by: Geliang Tang 
> ---
>  arch/powerpc/kernel/setup_64.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
> index 5c03a6a..726a9fb 100644
> --- a/arch/powerpc/kernel/setup_64.c
> +++ b/arch/powerpc/kernel/setup_64.c
> @@ -127,7 +127,7 @@ static void setup_tlb_core_data(void)
>   !mmu_has_feature(MMU_FTR_USE_TLBRSRV) &&
>   book3e_htw_mode != PPC_HTW_E6500) {
>   /* Should we panic instead? */
> - WARN_ONCE("%s: unsupported MMU configuration -- expect 
> problems\n",
> + WARN_ONCE(1, "%s: unsupported MMU configuration -- 
> expect problems\n",
> __func__);
>   }
>   }

Oh yuck.

Acked-by: Michael Ellerman 

cheers

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 7/7] powerpc: fix a problematic usage of WARN()

2015-11-25 Thread Geliang Tang
WARN() takes a condition and a format string. The condition was
omitted. So I added it.

Signed-off-by: Geliang Tang 
---
 arch/powerpc/kernel/setup_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 5c03a6a..726a9fb 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -127,7 +127,7 @@ static void setup_tlb_core_data(void)
!mmu_has_feature(MMU_FTR_USE_TLBRSRV) &&
book3e_htw_mode != PPC_HTW_E6500) {
/* Should we panic instead? */
-   WARN_ONCE("%s: unsupported MMU configuration -- expect 
problems\n",
+   WARN_ONCE(1, "%s: unsupported MMU configuration -- 
expect problems\n",
  __func__);
}
}
-- 
2.5.0


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev