From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: blk-merge warning in for-5.2/block
Date: Tue, 2 Apr 2019 09:02:23 +0800 [thread overview]
Message-ID: <20190402010222.GD21944@ming.t460p> (raw)
In-Reply-To: <100ac534-cce5-47d2-d703-e81fcbaca34f@kernel.dk>
On Mon, Apr 01, 2019 at 08:25:00AM -0600, Jens Axboe wrote:
> Hi Ming,
>
> I'm getting this one when building the new set with gcc 8.3.0:
>
>
> -- In file included from block/blk-merge.c:13:
> block/blk-merge.c: In function ‘blk_rq_map_sg’:
> block/blk.h:73:56: warning: ‘bvec.bv_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> phys_addr_t addr1 = page_to_phys(vec1->bv_page) + vec1->bv_offset;
> ~~~~^~~~~~~~~~~
> block/blk-merge.c:530:17: note: ‘bvec.bv_offset’ was declared here
> struct bio_vec bvec, bvprv = { NULL };
> ^~~~
> In file included from block/blk-merge.c:13:
> block/blk.h:76:18: warning: ‘bvec.bv_len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (addr1 + vec1->bv_len != addr2)
> ~~~~^~~~~~~~
> block/blk-merge.c:530:17: note: ‘bvec.bv_len’ was declared here
> struct bio_vec bvec, bvprv = { NULL };
> ^~~~
> In file included from ./arch/x86/include/asm/page.h:76,
> from ./arch/x86/include/asm/thread_info.h:12,
> from ./include/linux/thread_info.h:38,
> from ./arch/x86/include/asm/preempt.h:7,
> from ./include/linux/preempt.h:78,
> from ./include/linux/spinlock.h:51,
> from ./include/linux/seqlock.h:36,
> from ./include/linux/time.h:6,
> from ./include/linux/stat.h:19,
> from ./include/linux/module.h:10,
> from block/blk-merge.c:6:
> ./include/asm-generic/memory_model.h:55:52: warning: ‘bvec.bv_page’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
> ^
> block/blk-merge.c:530:17: note: ‘bvec.bv_page’ was declared here
> struct bio_vec bvec, bvprv = { NULL };
> ^~~~
It is one issue only if one bio doesn't include any bvec, I will post a
patch soon to fix it.
Thanks,
Ming
prev parent reply other threads:[~2019-04-02 1:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 14:25 blk-merge warning in for-5.2/block Jens Axboe
2019-04-02 1:02 ` Ming Lei [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=20190402010222.GD21944@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-block@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