From nobody Fri Jun 19 08:35:10 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37268C433EF for ; Wed, 6 Apr 2022 13:01:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230332AbiDFNDs (ORCPT ); Wed, 6 Apr 2022 09:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbiDFNCB (ORCPT ); Wed, 6 Apr 2022 09:02:01 -0400 Received: from mail.meizu.com (unknown [14.29.68.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55A615BE751 for ; Wed, 6 Apr 2022 02:27:04 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail04.meizu.com (172.16.1.16) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 6 Apr 2022 17:24:40 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Wed, 6 Apr 2022 17:24:39 +0800 From: Haowen Bai To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H. Peter Anvin" CC: Haowen Bai , Subject: [PATCH] x86/pgtable: Return true/false (not 1/0) from bool functions Date: Wed, 6 Apr 2022 17:24:37 +0800 Message-ID: <1649237077-474-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Return boolean values ("true" or "false") instead of 1 or 0 from bool functions. This fixes the following warnings from coccicheck: kernel/sched/fair.c:9846:9-10: WARNING: return of 0/1 in function 'imbalanced_active_balance' with return type bool Signed-off-by: Haowen Bai --- arch/x86/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index a3c22d2fe27e..6f0e261bae73 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1414,7 +1414,7 @@ static inline bool __pte_access_permitted(unsigned lo= ng pteval, bool write) need_pte_bits |=3D _PAGE_RW; =20 if ((pteval & need_pte_bits) !=3D need_pte_bits) - return 0; + return false; =20 return __pkru_allows_pkey(pte_flags_pkey(pteval), write); } --=20 2.7.4