From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A867CC4338F for ; Tue, 24 Aug 2021 08:25:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8766561248 for ; Tue, 24 Aug 2021 08:25:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235297AbhHXI0W (ORCPT ); Tue, 24 Aug 2021 04:26:22 -0400 Received: from foss.arm.com ([217.140.110.172]:60716 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233920AbhHXI0T (ORCPT ); Tue, 24 Aug 2021 04:26:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7FBDF101E; Tue, 24 Aug 2021 01:25:35 -0700 (PDT) Received: from [10.57.17.43] (unknown [10.57.17.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 125F33F766; Tue, 24 Aug 2021 01:25:33 -0700 (PDT) Subject: Re: [PATCH linux-next] arm:nommu: fix boolreturn.cocci warnings To: CGEL , Russell King Cc: Stephen Rothwell , Andrew Morton , Ira Weiny , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jing Yangyang , Zeal Robot , denghuilong@cdjrlc.com References: <20210824041112.57915-1-deng.changcheng@zte.com.cn> From: Vladimir Murzin Message-ID: <328bbb63-f8a6-2c50-2264-1fd404ff1f9d@arm.com> Date: Tue, 24 Aug 2021 09:25:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210824041112.57915-1-deng.changcheng@zte.com.cn> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/24/21 5:11 AM, CGEL wrote: > From: Jing Yangyang > > ./arch/arm/mm/nommu.c:59:8-9:WARNING:return of 0/1 in function > 'security_extensions_enabled' with return type bool > > Return statements in functions returning bool should use true/false > instead of 1/0. > > Generated by: scripts/coccinelle/misc/boolreturn.cocci > > Reported-by: Zeal Robot > Signed-off-by: Jing Yangyang > --- > arch/arm/mm/nommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c > index 2658f52..7256ac1 100644 > --- a/arch/arm/mm/nommu.c > +++ b/arch/arm/mm/nommu.c > @@ -56,7 +56,7 @@ static inline bool security_extensions_enabled(void) > if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) > return cpuid_feature_extract(CPUID_EXT_PFR1, 4) || > cpuid_feature_extract(CPUID_EXT_PFR1, 20); > - return 0; > + return false; > } > > unsigned long setup_vectors_base(void) > The same patch was sent before [1] by Huilong Deng. It was reviewed and author was advised to submit it into RMK's Patch system. [1] https://lore.kernel.org/linux-arm-kernel/1e30b659-a91a-58f6-f9aa-d0f0259eb9e8@arm.com/T/#t Cheers Vladimir