Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-18 Thread Nikita Danilov
Pavel Emelianov writes: > 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) \ >

[PATCH] Introduce a handy list_first_entry macro (v2)

2007-04-18 Thread Pavel Emelianov
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)

[PATCH] Introduce a handy list_first_entry macro (v2)

2007-04-18 Thread Pavel Emelianov
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

Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-18 Thread Nikita Danilov
Pavel Emelianov writes: 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) \

Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Randy Dunlap
On Tue, 17 Apr 2007 15:18:56 +0400 Pavel Emelianov wrote: > 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 > >

Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Zach Brown
On Tue, Apr 17, 2007 at 03:18:56PM +0400, Pavel Emelianov wrote: > 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 > >

Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Andi Kleen
Pavel Emelianov <[EMAIL PROTECTED]> writes: > 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,

[PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Pavel Emelianov
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)

[PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Pavel Emelianov
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

Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Andi Kleen
Pavel Emelianov [EMAIL PROTECTED] writes: 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) \

Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Zach Brown
On Tue, Apr 17, 2007 at 03:18:56PM +0400, Pavel Emelianov wrote: 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,

Re: [PATCH] Introduce a handy list_first_entry macro

2007-04-17 Thread Randy Dunlap
On Tue, 17 Apr 2007 15:18:56 +0400 Pavel Emelianov wrote: 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,