Re: [PATCH] Introduce a handy list_first_entry macro
- From: Andi Kleen <andi@xxxxxxxxxxxxxx>
- Date: 17 Apr 2007 17:19:12 +0200
Pavel Emelianov <xemul@xxxxx> 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) \
list_entry((head)->next, type, member)
Thanks. I always wanted that too.
-andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] Introduce a handy list_first_entry macro
- From: Pavel Emelianov
- [PATCH] Introduce a handy list_first_entry macro
- Prev by Date: Re: [PATCH] Show slab memory usage on OOM and SysRq-M
- Next by Date: Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag
- Previous by thread: [PATCH] Introduce a handy list_first_entry macro
- Next by thread: Re: [PATCH] Introduce a handy list_first_entry macro
- Index(es):
Relevant Pages
|