diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-12-03 22:29:09 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-12-03 22:29:09 +0100 |
commit | 2b8221e181c128ac3bc7a9cdc80db04884951e89 (patch) | |
tree | 8502701da9e4a1f8ab4b9824eb00868f68afd4e7 /block/blk-merge.c | |
parent | block: Silence spurious compiler warnings (diff) | |
download | linux-2b8221e181c128ac3bc7a9cdc80db04884951e89.tar.xz linux-2b8221e181c128ac3bc7a9cdc80db04884951e89.zip |
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); static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio, struct bio *nxt) { - struct bio_vec end_bv, nxt_bv; + struct bio_vec end_bv = { NULL }, nxt_bv; struct bvec_iter iter; - uninitialized_var(end_bv); - if (!blk_queue_cluster(q)) return 0; @@ -170,13 +168,11 @@ new_segment: int blk_rq_map_sg(struct request_queue *q, struct request *rq, struct scatterlist *sglist) { - struct bio_vec bvec, bvprv; + struct bio_vec bvec, bvprv = { NULL }; struct req_iterator iter; struct scatterlist *sg; int nsegs, cluster; - uninitialized_var(bvprv); - nsegs = 0; cluster = blk_queue_cluster(q); @@ -234,13 +230,11 @@ EXPORT_SYMBOL(blk_rq_map_sg); int blk_bio_map_sg(struct request_queue *q, struct bio *bio, struct scatterlist *sglist) { - struct bio_vec bvec, bvprv; + struct bio_vec bvec, bvprv = { NULL }; struct scatterlist *sg; int nsegs, cluster; struct bvec_iter iter; - uninitialized_var(bvprv); - nsegs = 0; cluster = blk_queue_cluster(q); |