[PATCH] vfs: fix boolreturn.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

 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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]