diff options
| author | Sanjana Sanikommu <[email protected]> | 2019-04-01 19:26:37 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-04-01 19:28:07 +0200 |
| commit | 0d15252370ec4f82d4f8afe828c2671485fc84f5 (patch) | |
| tree | 1c9eda4bde4ad225a31f61367a7ecb669868782d /tools/perf/scripts/python | |
| parent | 643cd0a25d5d1605eb3e6b083ef5accaddc616cf (diff) | |
staging: media: imx: Replace list_entry with list_for_each_entry_safe
Challenge suggested by coccinelle.
Replace use of the combination of list_empty() and list_entry() with
list_for_each_entry_safe() to simplify the code.
Issue found using below Coccinelle script.
@@
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry_safe;
@@
T *I1;
+ T *tmp;
...
- while (list_empty(&E1) == 0)
+ list_for_each_entry_safe (I1, tmp, &E1, I2)
{
...when != T *I1;
- I1 = list_entry(E1.next, T, I2);
...
}
Signed-off-by: Sanjana Sanikommu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions