summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-04-25 09:03:00 +0200
committerJens Axboe <axboe@kernel.dk>2019-04-30 09:26:13 -0600
commit2b070cfe582b8e99fec6ada57d2e59e194aae202 (patch)
tree354961c24c2cc77cdaa66128c5f2a0997bc746e8 /drivers/staging
parentf936b06ae53815a7633b30ffd8cf5661ac826b3a (diff)
downloadlinux-2b070cfe582b8e99fec6ada57d2e59e194aae202.tar.bz2
block: remove the i argument to bio_for_each_segment_all
We only have two callers that need the integer loop iterator, and they can easily maintain it themselves. Suggested-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: David Sterba <dsterba@suse.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Coly Li <colyli@suse.de> Reviewed-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/erofs/data.c3
-rw-r--r--drivers/staging/erofs/unzip_vle.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c
index 81af768e7248..9f04d7466c55 100644
--- a/drivers/staging/erofs/data.c
+++ b/drivers/staging/erofs/data.c
@@ -17,12 +17,11 @@
static inline void read_endio(struct bio *bio)
{
- int i;
struct bio_vec *bvec;
const blk_status_t err = bio->bi_status;
struct bvec_iter_all iter_all;
- bio_for_each_segment_all(bvec, bio, i, iter_all) {
+ bio_for_each_segment_all(bvec, bio, iter_all) {
struct page *page = bvec->bv_page;
/* page is already locked */
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index 31eef8395774..59b9f37d5c00 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -844,14 +844,13 @@ static void z_erofs_vle_unzip_kickoff(void *ptr, int bios)
static inline void z_erofs_vle_read_endio(struct bio *bio)
{
const blk_status_t err = bio->bi_status;
- unsigned int i;
struct bio_vec *bvec;
#ifdef EROFS_FS_HAS_MANAGED_CACHE
struct address_space *mc = NULL;
#endif
struct bvec_iter_all iter_all;
- bio_for_each_segment_all(bvec, bio, i, iter_all) {
+ bio_for_each_segment_all(bvec, bio, iter_all) {
struct page *page = bvec->bv_page;
bool cachemngd = false;