From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
"clm@fb.com" <clm@fb.com>,
"josef@toxicpanda.com" <josef@toxicpanda.com>,
"dsterba@suse.com" <dsterba@suse.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] btrfs: Assign boolean values to a bool variable
Date: Mon, 10 May 2021 15:38:35 +0200 [thread overview]
Message-ID: <20210510133835.GU7604@twin.jikos.cz> (raw)
In-Reply-To: <PH0PR04MB7416EC8C9020EAE3E074E21E9B549@PH0PR04MB7416.namprd04.prod.outlook.com>
On Mon, May 10, 2021 at 09:37:58AM +0000, Johannes Thumshirn wrote:
> On 04/03/2021 02:51, Jiapeng Chong wrote:
> > Fix the following coccicheck warnings:
> >
> > ./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function
> > 'dev_extent_hole_check_zoned' with return type bool.
> >
> > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> > ---
> > fs/btrfs/volumes.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> > index bc3b33e..995920f 100644
> > --- a/fs/btrfs/volumes.c
> > +++ b/fs/btrfs/volumes.c
> > @@ -1458,8 +1458,8 @@ static bool dev_extent_hole_check_zoned(struct btrfs_device *device,
> > /* Given hole range was invalid (outside of device) */
> > if (ret == -ERANGE) {
> > *hole_start += *hole_size;
> > - *hole_size = 0;
> > - return 1;
> > + *hole_size = false;
>
>
> Erm, hole_size is u64 and not bool
Thanks for catching it, I should have spotted that.
prev parent reply other threads:[~2021-05-10 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 9:45 [PATCH] btrfs: Assign boolean values to a bool variable Jiapeng Chong
2021-03-04 13:38 ` David Sterba
2021-05-10 9:37 ` Johannes Thumshirn
2021-05-10 13:38 ` David Sterba [this message]
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=20210510133835.GU7604@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=Johannes.Thumshirn@wdc.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).