diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-12-03 16:29:09 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-12-03 16:29:09 -0500 |
commit | 2b8221e181c128ac3bc7a9cdc80db04884951e89 (patch) | |
tree | 8502701da9e4a1f8ab4b9824eb00868f68afd4e7 /block/blk-merge.c | |
parent | 3f273d301b535ef46f9c689e5b2828b741e81050 (diff) |
block: Really silence spurious compiler warnings
The uninitialized_var() macro appears to not work on structs...
Get rid of it, and manually initialize instead.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 0b097f6b1778..8f8adaa95466 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c | |||
@@ -86,11 +86,9 @@ EXPORT_SYMBOL(blk_recount_segments); | |||
86 | static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio, | 86 | static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio, |
87 | struct bio *nxt) | 87 | struct bio *nxt) |
88 | { | 88 | { |
89 | struct bio_vec end_bv, nxt_bv; | 89 | struct bio_vec end_bv = { NULL }, nxt_bv; |
90 | struct bvec_iter iter; | 90 | struct bvec_iter iter; |
91 | 91 | ||
92 | uninitialized_var(end_bv); | ||
93 | |||
94 | if (!blk_queue_cluster(q)) | 92 | if (!blk_queue_cluster(q)) |
95 | return 0; | 93 | return 0; |
96 | 94 | ||
@@ -170,13 +168,11 @@ new_segment: | |||
170 | int blk_rq_map_sg(struct request_queue *q, struct request *rq, | 168 | int blk_rq_map_sg(struct request_queue *q, struct request *rq, |
171 | struct scatterlist *sglist) | 169 | struct scatterlist *sglist) |
172 | { | 170 | { |
173 | struct bio_vec bvec, bvprv; | 171 | struct bio_vec bvec, bvprv = { NULL }; |
174 | struct req_iterator iter; | 172 | struct req_iterator iter; |
175 | struct scatterlist *sg; | 173 | struct scatterlist *sg; |
176 | int nsegs, cluster; | 174 | int nsegs, cluster; |
177 | 175 | ||
178 | uninitialized_var(bvprv); | ||
179 | |||
180 | nsegs = 0; | 176 | nsegs = 0; |
181 | cluster = blk_queue_cluster(q); | 177 | cluster = blk_queue_cluster(q); |
182 | 178 | ||
@@ -234,13 +230,11 @@ EXPORT_SYMBOL(blk_rq_map_sg); | |||
234 | int blk_bio_map_sg(struct request_queue *q, struct bio *bio, | 230 | int blk_bio_map_sg(struct request_queue *q, struct bio *bio, |
235 | struct scatterlist *sglist) | 231 | struct scatterlist *sglist) |
236 | { | 232 | { |
237 | struct bio_vec bvec, bvprv; | 233 | struct bio_vec bvec, bvprv = { NULL }; |
238 | struct scatterlist *sg; | 234 | struct scatterlist *sg; |
239 | int nsegs, cluster; | 235 | int nsegs, cluster; |
240 | struct bvec_iter iter; | 236 | struct bvec_iter iter; |
241 | 237 | ||
242 | uninitialized_var(bvprv); | ||
243 | |||
244 | nsegs = 0; | 238 | nsegs = 0; |
245 | cluster = blk_queue_cluster(q); | 239 | cluster = blk_queue_cluster(q); |
246 | 240 | ||