linux-next: build warnings after merge of the block tree
Subsystems (2)
Hi Jens,
After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:
block/blk-merge.c: In function 'blk_rq_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c: In function 'blk_bio_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c: In function 'attempt_merge':block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
arm has its own definition of BIOVEC_PHYS_MERGEABLE() if that is relevant.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Hi all,
Quoted 26 lines · On Tue, 26 Nov 2013 13:29:46 +1100 Stephen Rothwell <[email protected]>…
After merging the block tree, today's linux-next build (arm
multi_v7_defconfig) produced these warnings:
block/blk-merge.c: In function 'blk_rq_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c: In function 'blk_bio_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c: In function 'attempt_merge':block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
Quoted 1 line
arm has its own definition of
BIOVEC_PHYS_MERGEABLE()if that is relevant.
For an easier test case, the i386 defcongig does this as well.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 29 lines · Stephen Rothwell
Hi all,
Quoted 26 lines · On Tue, 26 Nov 2013 13:29:46 +1100 Stephen Rothwell <[email protected]>…
After merging the block tree, today's linux-next build (arm
multi_v7_defconfig) produced these warnings:
block/blk-merge.c: In function 'blk_rq_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c: In function 'blk_bio_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c: In function 'attempt_merge':block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
Quoted 3 lines
Quoted 1 line
arm has its own definition of
BIOVEC_PHYS_MERGEABLE()if that is relevant.For an easier test case, the i386 defcongig does this as well.
I just noticed that i see this with gcc 4.7.0, but 4.8.1 does not warn.
-Olof
Jens Axboe
maintainerQuoted 30 lines · Olof Johansson
Quoted 29 lines · Stephen Rothwell
Hi all,
Quoted 26 lines · On Tue, 26 Nov 2013 13:29:46 +1100 Stephen Rothwell <[email protected]>…
After merging the block tree, today's linux-next build (arm
multi_v7_defconfig) produced these warnings:
block/blk-merge.c: In function 'blk_rq_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:171:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c: In function 'blk_bio_map_sg':block/blk-merge.c:133:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c:133:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:233:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c: In function 'attempt_merge':block/blk-merge.c:108:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared hereblock/blk-merge.c:108:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized]block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared here
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
arm has its own definition of
BIOVEC_PHYS_MERGEABLE()if that is relevant.For an easier test case, the i386 defcongig does this as well.
I just noticed that i see this with gcc 4.7.0, but 4.8.1 does not warn.
That's good, because it's not a bug. But arguably we should shut up 4.7 as well, however...
Signature · 1 line
Jens Axboe
PATCH 1/1 block: Silence spurious compiler warnings
Quoted 1 line
From
46e7081430f5f483906f496733a23f8e9d898879Mon Sep 17 00:00:00 2001
From: Kent Overstreet <[email protected]>
Date: Tue, 26 Nov 2013 16:36:49 -0800
Subject: [PATCH] block: Silence spurious compiler warnings
---
Quoted 5 lines · Jens Axboe
Quoted 1 line · Olof Johansson
I just noticed that i see this with gcc 4.7.0, but 4.8.1 does not warn.
That's good, because it's not a bug. But arguably we should shut up 4.7 as well, however...
Here you go:
block/blk-merge.c | 6 ++++++ 1 file changed, 6 insertions(+)
block/blk-merge.c +6 -0
@@ -89,6 +89,8 @@ static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,struct bio_vec end_bv, nxt_bv;struct bvec_iter iter; +uninitialized_var (end_bv); +if (!blk_queue_cluster (q))return 0 ;
@@ -173,6 +175,8 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,struct scatterlist *sg;int nsegs, cluster; +uninitialized_var (bvprv); + nsegs =0 ; cluster =blk_queue_cluster (q);
@@ -235,6 +239,8 @@ int blk_bio_map_sg(struct request_queue *q, struct bio *bio,int nsegs, cluster;struct bvec_iter iter; +uninitialized_var (bvprv); + nsegs =0 ; cluster =blk_queue_cluster (q);
Signature · 1 line
1.8.4.4
Re: [PATCH] block: Silence spurious compiler warnings
Hi Kent,
Quoted 7 lines · On Tue, 26 Nov 2013 16:39:49 -0800 Kent Overstreet <[email protected]> wrote:
From
46e7081430f5f483906f496733a23f8e9d898879Mon Sep 17 00:00:00 2001
From: Kent Overstreet <[email protected]>
Date: Tue, 26 Nov 2013 16:36:49 -0800
Subject: [PATCH] block: Silence spurious compiler warningsSigned-off-by Kent Overstreet <[email protected]>
Unfortunately, that did not work :-(
I am till getting these warnings into today's linux-next after merging the block tree (arm multi_v7_defconfig, gcc 4.6):
block/blk-merge.c: In function 'blk_rq_map_sg':block/blk-merge.c:135:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:173:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c:135:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:173:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:135:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:173:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c: In function 'blk_bio_map_sg':block/blk-merge.c:135:8: warning: 'bvprv.bv_offset' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:237:23: note: 'bvprv.bv_offset' was declared hereblock/blk-merge.c:135:8: warning: 'bvprv.bv_len' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:237:23: note: 'bvprv.bv_len' was declared hereblock/blk-merge.c:135:8: warning: 'bvprv.bv_page' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:237:23: note: 'bvprv.bv_page' was declared hereblock/blk-merge.c: In function 'attempt_merge':block/blk-merge.c:110:7: warning: 'end_bv.bv_offset' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:89:17: note: 'end_bv.bv_offset' was declared hereblock/blk-merge.c:110:7: warning: 'end_bv.bv_len' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:89:17: note: 'end_bv.bv_len' was declared hereblock/blk-merge.c:110:7: warning: 'end_bv.bv_page' may be used uninitialized in this function [-Wuninitialized] block/blk-merge.c:89:17: note: 'end_bv.bv_page' was declared here
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]