diff options
author | Jens Axboe <axboe@kernel.dk> | 2014-01-29 10:37:32 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2014-01-29 10:37:32 -0500 |
commit | 675675ada486dde5bf9aa51665e90706bff11a35 (patch) | |
tree | b0b091914f8a9c105a3cab347adff6922595c64d /arch | |
parent | 381d3ee33b9ccbe93404dbeae5be435922254f71 (diff) |
xtensa: fixup simdisk driver to work with immutable bio_vecs
Geert reported:
arch/xtensa/platforms/iss/simdisk.c:108:23: error: 'struct bio' has no member named 'bi_sector'
arch/xtensa/platforms/iss/simdisk.c:110:2: error: incompatible types when assigning to type 'int' from type 'struct bvec_iter'
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_size' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_size' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_size' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:110:2: error: request for member 'bv_len' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_size' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_size' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_size' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_size' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_bvec_done' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_idx' in something not a structure or union
arch/xtensa/platforms/iss/simdisk.c:111:18: error: request for member 'bi_bvec_done' in something not a structure or union
make[2]: *** [arch/xtensa/platforms/iss/simdisk.o] Error 1
Fixup the usage of bio_for_each_segment(). Also fix wrong use
of __bio_kunmap_atomic() - it needs the mapped buffer passed in,
not the originally mapped page.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/xtensa/platforms/iss/simdisk.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c index 8c6e819cd8ed..48eebacdf5fe 100644 --- a/arch/xtensa/platforms/iss/simdisk.c +++ b/arch/xtensa/platforms/iss/simdisk.c | |||
@@ -103,18 +103,18 @@ static void simdisk_transfer(struct simdisk *dev, unsigned long sector, | |||
103 | 103 | ||
104 | static int simdisk_xfer_bio(struct simdisk *dev, struct bio *bio) | 104 | static int simdisk_xfer_bio(struct simdisk *dev, struct bio *bio) |
105 | { | 105 | { |
106 | int i; | 106 | struct bio_vec bvec; |
107 | struct bio_vec *bvec; | 107 | struct bvec_iter iter; |
108 | sector_t sector = bio->bi_sector; | 108 | sector_t sector = bio->bi_iter.bi_sector; |
109 | 109 | ||
110 | bio_for_each_segment(bvec, bio, i) { | 110 | bio_for_each_segment(bvec, bio, iter) { |
111 | char *buffer = __bio_kmap_atomic(bio, i); | 111 | char *buffer = __bio_kmap_atomic(bio, iter); |
112 | unsigned len = bvec->bv_len >> SECTOR_SHIFT; | 112 | unsigned len = bvec.bv_len >> SECTOR_SHIFT; |
113 | 113 | ||
114 | simdisk_transfer(dev, sector, len, buffer, | 114 | simdisk_transfer(dev, sector, len, buffer, |
115 | bio_data_dir(bio) == WRITE); | 115 | bio_data_dir(bio) == WRITE); |
116 | sector += len; | 116 | sector += len; |
117 | __bio_kunmap_atomic(bio); | 117 | __bio_kunmap_atomic(buffer); |
118 | } | 118 | } |
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |