Pavel Emelianov
b5e618181a
Introduce a handy list_first_entry macro
...
There are many places in the kernel where the construction like
foo = list_entry(head->next, struct foo_struct, list);
are used.
The code might look more descriptive and neat if using the macro
list_first_entry(head, type, member) \
list_entry((head)->next, type, member)
Here is the macro itself and the examples of its usage in the generic code.
If it will turn out to be useful, I can prepare the set of patches to
inject in into arch-specific code, drivers, networking, etc.
Signed-off-by: Pavel Emelianov <xemul@openvz.org>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:11 -07:00
..
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:57 -07:00
2007-02-12 09:48:47 -08:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-02 18:57:59 -07:00
2007-05-07 12:12:51 -07:00
2007-05-02 18:57:59 -07:00
2007-05-08 11:14:59 -07:00
2007-05-07 12:26:27 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:15:01 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:14:57 -07:00
2007-05-07 12:12:57 -07:00
2007-02-12 09:48:47 -08:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-02-12 09:48:46 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2006-10-20 10:26:41 -07:00
2007-05-08 11:15:07 -07:00
2006-12-07 08:39:46 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:09 -07:00
2007-05-08 11:15:10 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:11 -07:00
2007-05-02 18:57:59 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-02-12 09:48:46 -08:00
2007-05-08 11:14:57 -07:00
2007-05-07 12:12:55 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2006-12-08 08:28:41 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:08 -07:00
2007-05-08 11:15:07 -07:00
2007-02-09 10:45:33 -08:00
2007-02-12 09:48:47 -08:00
2007-05-08 11:15:07 -07:00
2006-10-04 06:51:26 -06:00
2007-05-07 12:12:55 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:15:07 -07:00
2007-04-04 21:12:47 -07:00
2007-05-08 11:15:09 -07:00
2007-05-08 11:15:09 -07:00
2007-05-08 11:15:07 -07:00
2006-12-07 08:39:25 -08:00
2006-12-10 09:57:21 -08:00
2006-12-08 08:28:41 -08:00
2007-05-08 11:15:11 -07:00
2007-02-11 10:51:31 -08:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:08 -07:00
2006-12-10 09:57:22 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2006-12-22 08:55:50 -08:00
2007-05-08 11:15:01 -07:00
2007-01-26 12:53:20 -08:00
2006-09-29 09:18:24 -07:00
2007-05-08 11:15:11 -07:00
2007-02-12 09:48:28 -08:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:09 -07:00
2007-05-08 11:15:02 -07:00
2007-02-12 09:48:32 -08:00
2007-05-08 11:15:04 -07:00
2007-05-07 12:12:58 -07:00
2007-03-05 07:57:51 -08:00
2007-05-07 12:34:24 -07:00
2007-02-17 16:10:59 -05:00
2006-12-07 08:39:25 -08:00
2007-05-08 11:14:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:11 -07:00
2006-06-30 19:25:36 +02:00
2006-09-30 20:52:31 +02:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:03 -07:00
2007-05-08 11:15:11 -07:00
2006-12-08 08:28:51 -08:00
2006-10-01 00:39:19 -07:00
2006-03-23 07:38:11 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:14:59 -07:00
2006-10-01 00:39:28 -07:00
2007-05-08 11:15:09 -07:00
2007-05-08 11:15:09 -07:00
2006-12-08 08:28:41 -08:00
2007-03-29 14:26:42 +02:00
2007-02-19 14:21:50 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:01 -07:00
2007-05-08 11:15:04 -07:00
2006-12-04 02:00:24 -05:00
2007-02-14 08:09:54 -08:00
2007-05-08 11:15:07 -07:00