From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 15 Nov 2016 07:58:55 +0800 From: kbuild test robot To: Ian Kent Cc: kbuild-all@01.org, Andrew Morton , Linux Memory Management List , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] vfs: fix boolreturn.cocci warnings Message-ID: <20161114235851.GA29411@intel17.lkp.intel.com> References: <201611150731.dUsDxUoh%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201611150731.dUsDxUoh%fengguang.wu@intel.com> Sender: owner-linux-mm@kvack.org List-ID: 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 Signed-off-by: Fengguang Wu --- 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: email@kvack.org