From: Jan Kara <jack@suse.cz>
To: zhengbin <zhengbin13@huawei.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca,
linux-ext4@vger.kernel.org, yi.zhang@huawei.com
Subject: Re: [PATCH] ext4: use true,false for bool variable
Date: Thu, 9 Jan 2020 11:22:54 +0100 [thread overview]
Message-ID: <20200109102254.GE27035@quack2.suse.cz> (raw)
In-Reply-To: <1577241959-138695-1-git-send-email-zhengbin13@huawei.com>
On Wed 25-12-19 10:45:59, zhengbin wrote:
> Fixes coccicheck warning:
>
> fs/ext4/extents.c:5271:6-12: WARNING: Assignment of 0/1 to bool variable
> fs/ext4/extents.c:5287:4-10: WARNING: Assignment of 0/1 to bool variable
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/extents.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 0e8708b..d8611be 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -5268,7 +5268,7 @@ ext4_ext_shift_path_extents(struct ext4_ext_path *path, ext4_lblk_t shift,
> {
> int depth, err = 0;
> struct ext4_extent *ex_start, *ex_last;
> - bool update = 0;
> + bool update = false;
> depth = path->p_depth;
>
> while (depth >= 0) {
> @@ -5284,7 +5284,7 @@ ext4_ext_shift_path_extents(struct ext4_ext_path *path, ext4_lblk_t shift,
> goto out;
>
> if (ex_start == EXT_FIRST_EXTENT(path[depth].p_hdr))
> - update = 1;
> + update = true;
>
> while (ex_start <= ex_last) {
> if (SHIFT == SHIFT_LEFT) {
> --
> 2.7.4
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2020-01-09 10:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-25 2:45 [PATCH] ext4: use true,false for bool variable zhengbin
2020-01-09 10:22 ` Jan Kara [this message]
2020-01-13 19:04 ` Theodore Y. 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=20200109102254.GE27035@quack2.suse.cz \
--to=jack@suse.cz \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yi.zhang@huawei.com \
--cc=zhengbin13@huawei.com \
/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).