* blk-merge warning in for-5.2/block
@ 2019-04-01 14:25 Jens Axboe
2019-04-02 1:02 ` Ming Lei
0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2019-04-01 14:25 UTC (permalink / raw)
To: Ming Lei, linux-block@vger.kernel.org
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 };
^~~~
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: blk-merge warning in for-5.2/block
2019-04-01 14:25 blk-merge warning in for-5.2/block Jens Axboe
@ 2019-04-02 1:02 ` Ming Lei
0 siblings, 0 replies; 2+ messages in thread
From: Ming Lei @ 2019-04-02 1:02 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-02 1:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 14:25 blk-merge warning in for-5.2/block Jens Axboe
2019-04-02 1:02 ` Ming Lei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox