Content-Type: multipart/mixed; boundary="===============7348497484628454528==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] proc: fix boolreturn.cocci warnings Date: Fri, 05 Jun 2020 10:19:06 +0800 Message-ID: <20200605021906.GA9371@affccafec3c9> In-Reply-To: <20200604200413.587896-2-gladkov.alexey@gmail.com> List-Id: --===============7348497484628454528== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot fs/proc/generic.c:204:9-10: WARNING: return of 0/1 in function 'is_pde_visi= ble' 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-su= bset-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 =3D=3D &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 =3D=3D 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 !=3D &proc_root) { if (ent =3D=3D de) { read_unlock(&proc_subdir_lock); - return 1; + return true; } de =3D de->parent; } } = read_unlock(&proc_subdir_lock); - return 0; + return false; } = static DEFINE_IDA(proc_inum_ida); --===============7348497484628454528==--