Files
linux/drivers
Bhaktipriya Shridhar c997866cd2 staging: lustre: lnet: api-ni: Use list_for_each_entry_safe
Doubly linked lists which are  iterated  using list_empty
and list_entry macros have been replaced with list_for_each_entry_safe
macro.
This makes the iteration simpler and more readable.

This patch replaces the while loop containing list_empty and list_entry
with list_for_each_entry_safe.

This was done with Coccinelle.

@@
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: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
..
2016-03-01 16:10:45 -08:00
2016-02-10 11:35:55 -05:00
2015-12-29 15:32:24 -05:00
2016-02-14 14:25:59 -08:00
2016-03-01 16:10:45 -08:00
2016-01-01 18:31:34 +01:00
2015-12-21 11:44:00 +09:00
2016-01-12 12:17:28 +01:00
2016-02-23 17:17:20 -08:00
2016-02-12 08:10:31 -07:00
2016-02-14 14:25:59 -08:00
2016-01-22 18:04:28 -05:00
2016-01-20 17:09:18 -08:00
2016-01-03 16:32:59 -08:00
2016-01-12 01:12:40 +01:00
2016-01-20 17:09:18 -08:00
2015-12-12 08:53:21 +01:00
2016-02-17 09:24:07 +01:00
2015-12-01 14:26:33 -08:00
2016-02-07 23:17:59 -08:00