History

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.

Christoph Hellwig committed 7 years ago

Commit 2b070cf1 parent f936b0624 files · +47 −81Browse files

Showing the changes to include/linux (1 of 24 files). Show all

Unified · Split

include/linux/bio.h+2−3
@@ -134,9 +134,8 @@ static inline bool bio_next_segment(const struct bio *bio, · 133 unmodified lines
134134 * drivers should _never_ use the all version - the bio may have been split
135135 * before it got to the driver and the driver won't own all of it
136136 */
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); )
140139
141140 static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter,
142141 unsigned bytes)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t