From: Andi Kleen <andi@firstfloor.org>
To: Pavel Emelianov <xemul@sw.ru>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
devel@openvz.org, Kirill Korotaev <dev@openvz.org>
Subject: Re: [PATCH] Introduce a handy list_first_entry macro
Date: 17 Apr 2007 17:19:12 +0200 [thread overview]
Message-ID: <p73irbv58r3.fsf@bingen.suse.de> (raw)
In-Reply-To: <4624AD20.6050009@sw.ru>
Pavel Emelianov <xemul@sw.ru> 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
next prev parent reply other threads:[~2007-04-17 14:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-17 11:18 Pavel Emelianov
2007-04-17 15:19 ` Andi Kleen [this message]
2007-04-17 17:11 ` Zach Brown
2007-04-17 17:29 ` Randy Dunlap
2007-04-18 11:42 ` Nikita Danilov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p73irbv58r3.fsf@bingen.suse.de \
--to=andi@firstfloor.org \
--cc=akpm@osdl.org \
--cc=dev@openvz.org \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@sw.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®