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=-10.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,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 DE960C433E0 for ; Fri, 5 Jun 2020 02:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD80920738 for ; Fri, 5 Jun 2020 02:19:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726088AbgFECTX (ORCPT ); Thu, 4 Jun 2020 22:19:23 -0400 Received: from mga04.intel.com ([192.55.52.120]:39604 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgFECTW (ORCPT ); Thu, 4 Jun 2020 22:19:22 -0400 IronPort-SDR: AYu4mVsExGS6+78qLo5+pWSGEo0QvuWY/NP0pgVAVIRmO0UmSkvWpsoELJRaDVINJl7+M8zz45 mrwB/8dcf8vw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2020 19:19:21 -0700 IronPort-SDR: tS9Pt/32gDKEFuBphYH6Hk5fx1Jdk3Dop6C/9sin11LG51CG5PKy0OhS9Z6SRlMIrbxbwkqc0D mWViCojoZfnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,474,1583222400"; d="scan'208";a="294539060" Received: from lkp-server02.sh.intel.com (HELO 85fa322b0eb2) ([10.239.97.151]) by fmsmga004.fm.intel.com with ESMTP; 04 Jun 2020 19:19:19 -0700 Received: from kbuild by 85fa322b0eb2 with local (Exim 4.92) (envelope-from ) id 1jh1x0-00000h-Rn; Fri, 05 Jun 2020 02:19:18 +0000 Date: Fri, 5 Jun 2020 10:19:06 +0800 From: kernel test robot To: Alexey Gladkov , LKML Cc: kbuild-all@lists.01.org, Linux FS Devel , Alexander Viro , Alexey Dobriyan , Alexey Gladkov , Andy Lutomirski , "Eric W . Biederman" , Kees Cook Subject: [PATCH] proc: fix boolreturn.cocci warnings Message-ID: <20200605021906.GA9371@affccafec3c9> References: <20200604200413.587896-2-gladkov.alexey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200604200413.587896-2-gladkov.alexey@gmail.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kernel test robot fs/proc/generic.c:204:9-10: WARNING: return of 0/1 in function 'is_pde_visible' 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 CC: Alexey Gladkov Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Alexey-Gladkov/proc-use-subset-option-to-hide-some-top-level-procfs-entries/20200605-040818 base: d4899e5542c15062cc55cac0ca99025bb64edc61 generic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -201,7 +201,7 @@ bool is_pde_visible(struct proc_fs_info int i; if (!fs_info->whitelist || pde == &proc_root) - return 1; + return true; read_lock(&proc_subdir_lock); @@ -218,7 +218,7 @@ bool is_pde_visible(struct proc_fs_info if (ent == pde) { read_unlock(&proc_subdir_lock); - return 1; + return true; } if (!S_ISDIR(ent->mode)) @@ -228,14 +228,14 @@ bool is_pde_visible(struct proc_fs_info while (de != &proc_root) { if (ent == de) { read_unlock(&proc_subdir_lock); - return 1; + return true; } de = de->parent; } } read_unlock(&proc_subdir_lock); - return 0; + return false; } static DEFINE_IDA(proc_inum_ida);