Commit 4a3b666
block: use dedicated list iterator variable
To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.
To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Link: https://lore.kernel.org/r/20220331091218.641532-1-jakobkoschel@gmail.com
[axboe: move lookup to where return value is checked]
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent d186832 commit 4a3b666
1 file changed
Lines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4448 | 4448 | | |
4449 | 4449 | | |
4450 | 4450 | | |
4451 | | - | |
4452 | | - | |
| 4451 | + | |
| 4452 | + | |
4453 | 4453 | | |
4454 | 4454 | | |
4455 | | - | |
4456 | 4455 | | |
4457 | 4456 | | |
4458 | | - | |
4459 | | - | |
4460 | | - | |
4461 | | - | |
| 4457 | + | |
| 4458 | + | |
4462 | 4459 | | |
4463 | | - | |
4464 | | - | |
| 4460 | + | |
| 4461 | + | |
4465 | 4462 | | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
4466 | 4473 | | |
4467 | 4474 | | |
4468 | 4475 | | |
| |||
0 commit comments