linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: CGEL <cgel.zte@gmail.com>
Cc: tytso@mit.edu, Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jing Yangyang <jing.yangyang@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] ext4:namei: fix boolreturn.cocci warnings
Date: Thu, 14 Oct 2021 11:26:55 +0200	[thread overview]
Message-ID: <20211014092655.GD15931@quack2.suse.cz> (raw)
In-Reply-To: <20210824055543.58718-1-deng.changcheng@zte.com.cn>

On Mon 23-08-21 22:55:43, CGEL wrote:
> From: Jing Yangyang <jing.yangyang@zte.com.cn>
> 
> Return statements in functions returning bool should use true/false
> instead of 1/0.
> 
> ./fs/ext4/namei.c:1441:12-13:WARNING:return of 0/1 in function
> 'ext4_match' with return type bool
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>

This seems to have fallen through the cracks. The fix looks good to me.
Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/namei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index f3bbcd4..b5cb32d 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -1438,7 +1438,7 @@ static bool ext4_match(struct inode *parent,
>  					fname->hinfo.minor_hash !=
>  						EXT4_DIRENT_MINOR_HASH(de)) {
>  
> -					return 0;
> +					return false;
>  				}
>  			}
>  			return !ext4_ci_compare(parent, &cf, de->name,
> -- 
> 1.8.3.1
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2021-10-14  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24  5:55 [PATCH linux-next] ext4:namei: fix boolreturn.cocci warnings CGEL
2021-10-14  9:26 ` Jan Kara [this message]
2021-10-28 14:52 ` Theodore Ts'o

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=20211014092655.GD15931@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=cgel.zte@gmail.com \
    --cc=jing.yangyang@zte.com.cn \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=zealci@zte.com.cn \
    /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).