Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500AbbKZFZt (ORCPT ); Thu, 26 Nov 2015 00:25:49 -0500 Received: from ozlabs.org ([103.22.144.67]:60015 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbbKZFZq (ORCPT ); Thu, 26 Nov 2015 00:25:46 -0500 Message-ID: <1448515544.9839.11.camel@ellerman.id.au> Subject: Re: [PATCH 7/7] powerpc: fix a problematic usage of WARN() From: Michael Ellerman To: Geliang Tang , Benjamin Herrenschmidt , Paul Mackerras , Scott Wood , David Gibson Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Thu, 26 Nov 2015 16:25:44 +1100 In-Reply-To: <84a366614b84091cd4bd354e8b65dd51c1762a52.1448456395.git.geliangtang@163.com> References: <86c73f180d3054c1bf17bdac8c89026209167c9b.1448456395.git.geliangtang@163.com> <84a366614b84091cd4bd354e8b65dd51c1762a52.1448456395.git.geliangtang@163.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1179 Lines: 34 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/