diff options
| author | Christoph Hellwig <[email protected]> | 2019-04-25 09:03:00 +0200 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2019-04-30 09:26:13 -0600 |
| commit | 2b070cfe582b8e99fec6ada57d2e59e194aae202 (patch) | |
| tree | 354961c24c2cc77cdaa66128c5f2a0997bc746e8 /include/linux | |
| parent | f936b06ae53815a7633b30ffd8cf5661ac826b3a (diff) | |
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 <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Acked-by: David Sterba <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Acked-by: Coly Li <[email protected]>
Reviewed-by: Matthew Wilcox <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bio.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 9577ad8f6e28..186b2723c61b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -134,9 +134,8 @@ static inline bool bio_next_segment(const struct bio *bio, * drivers should _never_ use the all version - the bio may have been split * before it got to the driver and the driver won't own all of it */ -#define bio_for_each_segment_all(bvl, bio, i, iter) \ - for (i = 0, bvl = bvec_init_iter_all(&iter); \ - bio_next_segment((bio), &iter); i++) +#define bio_for_each_segment_all(bvl, bio, iter) \ + for (bvl = bvec_init_iter_all(&iter); bio_next_segment((bio), &iter); ) static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter, unsigned bytes) |