diff options
| author | Bhumika Goyal <[email protected]> | 2016-02-25 23:03:47 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-02-25 22:21:20 -0800 |
| commit | b93656182e02c22bb2f447dfd3dc460500d7e1c7 (patch) | |
| tree | e3a6bbc40cdb3cd7b6f71c6779672746e0a06841 /tools/perf/scripts/python | |
| parent | 1bf28ba7d64ac0d50d2c04ac6484a5f9dc3d1dfb (diff) | |
Staging: lustre: lov: Use list_for_each_entry instead of list_for_each
Use list_for_each_entry instead of list_for_each and list_entry as it
simplifies the code. Done using coccinelle:
@@
type T,T2;
identifier I1,I2;
expression e1,e2;
iterator name list_for_each_entry;
iterator name list_for_each;
@@
- T *I1;
...
- list_for_each(I1,e1)
+ list_for_each_entry(I2,e1,e2)
{
...when!=T *I1;
- I2=list_entry(I1,T2,e2);
...
}
...when!=I2;
@@
type T,T2,T3;
identifier I1,I2,I3;
expression e1,e2;
@@
- T *I1;
+ T3 *I3;
...
- list_for_each(I1,e1)
+ list_for_each_entry(I3,e1,e2)
{
...when!=T *I1;
- T3 *I3=list_entry(I1,T2,e2);
...
}
...when!=I3;
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions