Harsha Sharma
b7fa1bdb10
drm/tinydrm: Replace list_for_each with list_for_each_entry
...
Replace use of list_for_each with list_for_each_entry to simplify the
code and remove variables that are used only in list_for_each.
Done with following coccinelle patch:
@r@
identifier fn,i,f,p;
expression e;
iterator name list_for_each, list_for_each_entry;
type T;
@@
fn(...) {
++ T *i;
<+...
- list_for_each(p,e)
+ list_for_each_entry(i,e,f)
{
...
- T *i = list_entry(p,T,f);
...
}
...+>
}
@@
identifier r.fn,r.p;
@@
fn(...) {
...
- struct list_head *p;
... when != p
}
@@
identifier r.fn,r.i,r.f;
expression r.e;
statement S;
@@
fn(...) {
<...
list_for_each_entry(i,e,f)
- {
S
- }
...>
}
@s@
identifier i,f,p;
expression e;
type T;
@@
- list_for_each(p,e)
+ list_for_each_entry(i,e,f)
{
... when != T *i;
- i = list_entry(p,T,f);
...
}
@@
identifier s.p;
@@
- struct list_head *p;
... when != p
@@
identifier s.i,s.f;
expression s.e;
statement S;
@@
list_for_each_entry(i,e,f)
- {
S
- }
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171014202823.29230-1-harshasharmaiitr@gmail.com
2017-10-21 16:28:41 +02:00
..
2017-10-03 09:35:04 +10:00
2017-09-02 14:23:06 +02:00
2017-08-27 19:29:46 +02:00
2017-10-16 15:02:44 -04:00
2017-08-17 07:33:41 +10:00
2017-08-27 19:30:15 +02:00
2017-08-16 20:18:55 +02:00
2017-10-18 09:38:43 +05:30
2017-08-16 20:14:22 +02:00
2017-09-28 05:48:53 +10:00
2017-09-28 05:46:15 +10:00
2017-10-01 17:00:20 +02:00
2017-10-16 11:29:05 +02:00
2017-10-12 14:09:45 -04:00
2017-08-22 08:33:44 +02:00
2017-09-28 07:12:44 +10:00
2017-09-28 05:46:15 +10:00
2017-09-13 18:53:16 -07:00
2017-08-21 08:49:24 +05:30
2017-10-01 17:01:39 +02:00
2017-07-26 13:43:33 +02:00
2017-08-16 20:18:22 +02:00
2017-10-11 13:17:52 +02:00
2017-10-01 17:02:20 +02:00
2017-09-14 11:59:30 +02:00
2017-08-23 12:22:12 +03:00
2017-10-19 11:48:44 +02:00
2017-09-10 23:58:42 +02:00
2017-09-25 08:35:53 +02:00
2017-10-03 09:35:04 +10:00
2017-10-01 17:02:53 +02:00
2017-10-20 14:38:41 -04:00
2017-09-13 18:53:16 -07:00
2017-10-01 17:03:22 +02:00
2017-08-27 19:30:49 +02:00
2017-10-10 11:32:48 +02:00
2017-10-17 19:49:17 +02:00
2017-09-26 11:08:17 +02:00
2017-09-26 13:12:15 +02:00
2017-10-21 16:28:41 +02:00
2017-09-28 08:37:02 +10:00
2017-10-01 17:04:36 +02:00
2017-10-16 15:37:19 -04:00
2017-10-19 13:20:09 -07:00
2017-08-11 11:41:43 -04:00
2017-10-16 11:29:28 +02:00
2017-10-03 11:09:16 +02:00
2017-09-03 17:02:26 -07:00
2017-08-27 19:31:06 +02:00
2017-09-20 09:54:19 -07:00
2017-10-18 10:23:25 +02:00
2017-10-06 11:05:50 +02:00
2017-09-13 18:53:16 -07:00
2017-08-21 08:51:53 +05:30
2017-09-26 07:12:56 +02:00
2017-10-13 15:49:03 -04:00
2017-08-08 14:45:09 +02:00
2017-09-13 09:52:05 +02:00
2017-09-13 09:50:52 +02:00
2017-09-13 18:53:16 -07:00
2017-10-11 18:41:44 +03:00
2017-09-11 16:03:57 +03:00
2017-10-20 13:14:48 -04:00
2017-07-29 13:51:44 +02:00
2017-09-19 18:11:45 +03:00
2017-09-19 17:49:25 +03:00
2017-10-01 17:05:39 +02:00
2017-10-13 15:49:03 -04:00
2017-08-11 10:48:03 +02:00
2017-07-26 13:43:33 +02:00
2017-10-16 15:19:57 +02:00
2017-10-08 15:02:51 +02:00
2017-10-04 18:04:28 +02:00
2017-08-29 10:16:25 +10:00
2017-07-26 13:43:33 +02:00
2017-08-29 10:16:25 +10:00
2017-09-19 18:11:45 +03:00
2017-07-26 13:45:06 +02:00
2017-09-08 18:26:49 -07:00
2017-08-01 17:50:06 +01:00
2017-09-11 15:53:33 +03:00
2017-07-31 14:23:30 +02:00
2017-08-01 17:50:06 +01:00
2017-09-13 09:50:52 +02:00
2017-10-13 16:59:36 +02:00
2017-09-27 10:53:12 +02:00
2017-10-13 15:49:03 -04:00
2017-09-28 05:46:15 +10:00
2017-09-27 10:53:12 +02:00
2017-10-20 13:14:48 -04:00
2017-09-19 17:49:25 +03:00
2017-07-14 15:53:06 +02:00
2017-09-28 05:46:15 +10:00
2017-08-01 17:50:06 +01:00
2017-10-13 16:01:06 +03:00
2017-09-05 11:11:18 +02:00
2017-10-12 17:34:28 +03:00
2017-09-04 12:21:28 -07:00
2017-09-08 18:26:49 -07:00
2017-09-28 08:37:02 +10:00
2017-09-28 08:37:02 +10:00