Commit 95073b7
opp: replace usage of found with 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].
This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>1 parent 543256d commit 95073b7
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1486 | 1486 | | |
1487 | 1487 | | |
1488 | 1488 | | |
1489 | | - | |
| 1489 | + | |
1490 | 1490 | | |
1491 | | - | |
1492 | 1491 | | |
1493 | 1492 | | |
1494 | 1493 | | |
1495 | 1494 | | |
1496 | 1495 | | |
1497 | 1496 | | |
1498 | 1497 | | |
1499 | | - | |
1500 | | - | |
1501 | | - | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
1502 | 1501 | | |
1503 | 1502 | | |
1504 | 1503 | | |
1505 | 1504 | | |
1506 | 1505 | | |
1507 | 1506 | | |
1508 | | - | |
| 1507 | + | |
1509 | 1508 | | |
1510 | 1509 | | |
1511 | 1510 | | |
| |||
0 commit comments