Re: [PATCH] Introduce a handy list_first_entry macro
- From: Nikita Danilov <nikita@xxxxxxxxxxxxx>
- Date: Wed, 18 Apr 2007 15:42:05 +0400
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) \
list_entry((head)->next, type, member)
Won't list_next_entry() be more descriptive name for that?
Nikita.
-
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 0/4] 2.6.21-rc7 NFS writes: fix a series of issues
- Next by Date: Re: Disabling x86 System Management Mode
- Previous by thread: Re: [PATCH] Introduce a handy list_first_entry macro
- Next by thread: [BUG 2.6.21-rc7] acpi_pm clocksource loses time on x86-64
- Index(es):
Relevant Pages
|