We only have two callers that need the integer loop iterator, and they can easily maintain it themselves.
Showing the changes to include/linux (1 of 24 files). Show all
Unified · Split
| @@ -134,9 +134,8 @@ static inline bool bio_next_segment(const struct bio *bio, · 133 unmodified lines | ||
| 134 | 134 | * drivers should _never_ use the all version - the bio may have been split |
| 135 | 135 | * before it got to the driver and the driver won't own all of it |
| 136 | 136 | */ |
| 137 | −#define bio_for_each_segment_all(bvl, bio, i, iter) \ | |
| 138 | − for (i = 0, bvl = bvec_init_iter_all(&iter); \ | |
| 139 | − bio_next_segment((bio), &iter); i++) | |
| 137 | +#define bio_for_each_segment_all(bvl, bio, iter) \ | |
| 138 | + for (bvl = bvec_init_iter_all(&iter); bio_next_segment((bio), &iter); ) | |
| 140 | 139 | |
| 141 | 140 | static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter, |
| 142 | 141 | unsigned bytes) |