From: kbuild test robot <fengguang.wu@intel.com>
To: Ian Kent <ikent@redhat.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] vfs: fix boolreturn.cocci warnings
Date: Tue, 15 Nov 2016 07:58:55 +0800 [thread overview]
Message-ID: <20161114235851.GA29411@intel17.lkp.intel.com> (raw)
In-Reply-To: <201611150731.dUsDxUoh%fengguang.wu@intel.com>
fs/namespace.c:1185:9-10: WARNING: return of 0/1 in function 'path_is_mountpoint' with return type bool
fs/namespace.c:1199:9-10: WARNING: return of 0/1 in function 'path_is_mountpoint_rcu' 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: Ian Kent <ikent@redhat.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
namespace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1182,7 +1182,7 @@ bool path_is_mountpoint(struct path *pat
bool res;
if (!d_mountpoint(path->dentry))
- return 0;
+ return false;
rcu_read_lock();
res = __path_is_mountpoint(path);
@@ -1196,7 +1196,7 @@ EXPORT_SYMBOL(path_is_mountpoint);
bool path_is_mountpoint_rcu(struct path *path)
{
if (!d_mountpoint(path->dentry))
- return 0;
+ return false;
return __path_is_mountpoint(path);
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-11-14 23:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 23:58 [linux-next:master 5439/5763] fs/namespace.c:1185:9-10: WARNING: return of 0/1 in function 'path_is_mountpoint' with return type bool kbuild test robot
2016-11-14 23:58 ` kbuild test robot [this message]
2020-02-11 17:55 [PATCH] vfs: keep inodes with page cache off the inode shrinker LRU Johannes Weiner
2020-02-14 21:30 ` [PATCH] vfs: fix boolreturn.cocci warnings kbuild test robot
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=20161114235851.GA29411@intel17.lkp.intel.com \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=ikent@redhat.com \
--cc=kbuild-all@01.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).