diff mbox

vfs: fix boolreturn.cocci warnings

Message ID 20161114235851.GA29411@intel17.lkp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fengguang Wu Nov. 14, 2016, 11:58 p.m. UTC
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(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 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);
 }