From: kernel test robot <lkp@intel.com>
To: Alexey Gladkov <gladkov.alexey@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: kbuild-all@lists.01.org,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Alexey Dobriyan <adobriyan@gmail.com>,
Alexey Gladkov <legion@kernel.org>,
Andy Lutomirski <luto@kernel.org>,
"Eric W . Biederman" <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>
Subject: [PATCH] proc: fix boolreturn.cocci warnings
Date: Fri, 5 Jun 2020 10:19:06 +0800 [thread overview]
Message-ID: <20200605021906.GA9371@affccafec3c9> (raw)
In-Reply-To: <20200604200413.587896-2-gladkov.alexey@gmail.com>
From: kernel test robot <lkp@intel.com>
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 <gladkov.alexey@gmail.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
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);
next prev parent reply other threads:[~2020-06-05 2:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 20:04 [PATCH 0/2] proc: use subset option to hide some top-level procfs entries Alexey Gladkov
2020-06-04 20:04 ` [PATCH 1/2] " Alexey Gladkov
2020-06-05 2:19 ` kernel test robot
2020-06-05 2:19 ` kernel test robot [this message]
2020-06-04 20:04 ` [PATCH 2/2] docs: proc: update documentation about subset= parameter Alexey Gladkov
2020-06-04 20:33 ` [PATCH 0/2] proc: use subset option to hide some top-level procfs entries Eric W. Biederman
2020-06-04 21:32 ` Christian Brauner
2020-06-05 0:28 ` Alexey Gladkov
2020-06-05 0:08 ` Alexey Gladkov
2020-06-05 4:17 ` Eric W. Biederman
2020-06-05 14:47 ` Alexey Gladkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200605021906.GA9371@affccafec3c9 \
--to=lkp@intel.com \
--cc=adobriyan@gmail.com \
--cc=ebiederm@xmission.com \
--cc=gladkov.alexey@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=keescook@chromium.org \
--cc=legion@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).