From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Gao Xiang <gaoxiang25@huawei.com>
Cc: devel@driverdev.osuosl.org, linux-erofs@lists.ozlabs.org,
Chao Yu <yuchao0@huawei.com>, LKML <linux-kernel@vger.kernel.org>,
weidu.du@huawei.com, Miao Xie <miaoxie@huawei.com>
Subject: Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints
Date: Tue, 18 Sep 2018 14:14:13 +0200 [thread overview]
Message-ID: <20180918121413.GA499@kroah.com> (raw)
In-Reply-To: <aab26d0e-f8dc-cc83-46eb-7a93a833eaae@huawei.com>
On Tue, Sep 18, 2018 at 08:02:30PM +0800, Gao Xiang wrote:
> Hi Greg,
>
> On 2018/9/18 19:19, Greg Kroah-Hartman wrote:
> > On Fri, Sep 14, 2018 at 10:40:22PM +0800, Gao Xiang wrote:
> >> In order to avoid conflicts with cleanup patches, Chao and I think
> >> it is better to send reviewed preview patches in the erofs mailing list
> >> to the community in time.
> >>
> >> So here is reviewed & tested patches right now, which clean up and
> >> enhance the error handing and add some tracepoints for decompression.
> >>
> >> Note that in this patchset, bare use of 'unsigned' and NULL comparison are
> >> also fixed compared with the preview patches according to the previous
> >> discussion in the staging mailing list.
> >
> > I applied this, but I need to go delete it as this patch series adds a
> > build warning to the system:
> >
> > In file included from drivers/staging/erofs/unzip_vle.h:16:0,
> > from drivers/staging/erofs/unzip_vle.c:13:
> > drivers/staging/erofs/unzip_vle.c: In function ‘z_erofs_map_blocks_iter’:
> > drivers/staging/erofs/internal.h:303:34: warning: ‘pblk’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> > #define blknr_to_addr(nr) ((erofs_off_t)(nr) * EROFS_BLKSIZ)
> > ^
> > drivers/staging/erofs/unzip_vle.c:1574:20: note: ‘pblk’ was declared here
> > erofs_blk_t mblk, pblk;
> > ^~~~
> >
> > Please fix that up and resend.
>
> strange... my compiler (4.8.4) and huawei internal CI don't report that,
> and this patchset has been in Chao's tree for a while, I don't get any report so far...
>
> I just looked into that code again and it seems a false warning since
> 1) this code is heavily running on the products and working fine till now.
> 2) pblk gets a proper value before unzip_vle.c:1690 map->m_pa = blknr_to_addr(pblk);
>
> so I think I need to silence this warning for now and check if there is a really issue....
Don't just silent the warning. Usually gcc now properly detects where
there really is a problem, it should not be a false-positive. And in
looking at the code, it does seem that pblk could not be set if one of
the different case statements is taken and then exact_hitted: is jumped
to, right?
Or is gcc just being "dumb" here? What about clang, have you tried
building it with that compiler as well?
thanks,
greg k-h
next prev parent reply other threads:[~2018-09-18 12:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 14:40 [PATCH 0/8] staging: erofs: error handing and more tracepoints Gao Xiang
2018-09-14 14:40 ` [PATCH 1/8] staging: erofs: fix a missing endian conversion Gao Xiang
2018-09-14 14:40 ` [PATCH 2/8] staging: erofs: clean up z_erofs_map_blocks_iter Gao Xiang
2018-09-14 14:40 ` [PATCH 3/8] staging: erofs: complete error handing of z_erofs_map_blocks_iter Gao Xiang
2018-09-14 14:40 ` [PATCH 4/8] staging: erofs: fix a bug when appling cache strategy Gao Xiang
2018-09-14 14:40 ` [PATCH 5/8] staging: erofs: complete error handing of z_erofs_do_read_page Gao Xiang
2018-09-14 14:40 ` [PATCH 6/8] staging: erofs: avoid magic constants when initializing clusterbits Gao Xiang
2018-09-14 14:40 ` [PATCH 7/8] staging: erofs: add trace points for reading zipped data Gao Xiang
2018-09-14 14:40 ` [PATCH 8/8] staging: erofs: replace BUG_ON with DBG_BUGON in data.c Gao Xiang
2018-09-18 11:19 ` [PATCH 0/8] staging: erofs: error handing and more tracepoints Greg Kroah-Hartman
2018-09-18 12:02 ` Gao Xiang
2018-09-18 12:14 ` Greg Kroah-Hartman [this message]
2018-09-18 12:31 ` Gao Xiang
2018-09-18 13:03 ` Dan Carpenter
2018-09-18 13:09 ` Greg Kroah-Hartman
2018-09-18 13:20 ` Gao Xiang
2018-09-18 13:44 ` [PATCH] staging: erofs: initialize `pblk' with 0 first in `z_erofs_map_blocks_iter' Gao Xiang
2018-09-18 13:57 ` Greg Kroah-Hartman
2018-09-18 14:06 ` Gao Xiang
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=20180918121413.GA499@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=gaoxiang25@huawei.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=weidu.du@huawei.com \
--cc=yuchao0@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