All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Dmitry Torokhov <dtor@insightbb.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [RFC/PATCH] Introduce list_get() and list_get_tail()
Date: Sat, 8 Jul 2006 20:31:17 +0200	[thread overview]
Message-ID: <200607082031.17638.arnd@arndb.de> (raw)
In-Reply-To: <200607080124.21856.dtor@insightbb.com>

Am Saturday 08 July 2006 07:24 schrieb Dmitry Torokhov:
> +/**
> + * list_get - get first element in a list
> + * @head: the head of your list
> + */
> +static inline struct list_head *list_get(struct list_head *head)
> +{
> +       return head->next;
> +}

I would expect it to be more useful when combined with list_entry(),
something like

#define list_first_entry(list, type, member) \
	container_of((list)->next, type, member)
#define list_last_entry(list, type, member) \
	container_of((list)->prev, type, member)

	Arnd <><

      parent reply	other threads:[~2006-07-08 18:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08  5:24 [RFC/PATCH] Introduce list_get() and list_get_tail() Dmitry Torokhov
2006-07-08 13:58 ` Andi Kleen
2006-07-08 14:16   ` Arjan van de Ven
2006-07-08 17:02     ` Matthieu CASTET
2006-07-09  3:28     ` Dmitry Torokhov
2006-07-11 17:43       ` Josef Sipek
2006-07-11 17:58         ` Dmitry Torokhov
2006-07-08 18:31 ` Arnd Bergmann [this message]

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=200607082031.17638.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@osdl.org \
    --cc=dtor@insightbb.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.