mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Martin Peschke <mp3@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, chase.venters@clientec.com,
	nickpiggin@yahoo.com.au, kaos@ocs.com.au, akpm@osdl.org,
	clameter@sgi.com, fche@redhat.com, peterc@gelato.unsw.edu.au,
	hch@infradead.org, arjan@infradead.org, ak@suse.de
Subject: Re: [RFC] [Patch 1/6] statistics infrastructure - prerequisite: list operation
Date: Wed, 17 May 2006 21:34:01 -0700	[thread overview]
Message-ID: <20060517213401.b97cc0ee.rdunlap@xenotime.net> (raw)
In-Reply-To: <1147891845.3076.11.camel@dyn-9-152-230-71.boeblingen.de.ibm.com>

On Wed, 17 May 2006 20:50:44 +0200 Martin Peschke wrote:

> This patch adds another list_for_each_* derivate. I can't work around it
> because there is a list that I need to search both ways.
> 
> Signed-off-by: Martin Peschke <mp3@de.ibm.com>
> ---
> 
>  list.h |   12 ++++++++++++
>  1 files changed, 12 insertions(+)
> 
> diff -Nurp a/include/linux/list.h b/include/linux/list.h
> --- a/include/linux/list.h	2006-05-17 19:02:03.000000000 +0200
> +++ b/include/linux/list.h	2006-05-17 19:05:41.000000000 +0200
> @@ -411,6 +411,18 @@ static inline void list_splice_init(stru
>  	     pos = list_entry(pos->member.next, typeof(*pos), member))
>  
>  /**
> + * list_for_each_entry_continue_reverse -	iterate backwards over list
> + *			of given type continuing before existing point

kernel-doc function name and short description need to fit on one line.
(list.h has some other problems like that; I'll fix those up.)

> + * @pos:	the type * to use as a loop counter.
> + * @head:	the head for your list.
> + * @member:	the name of the list_struct within the struct.
> + */
> +#define list_for_each_entry_continue_reverse(pos, head, member) 	\
> +	for (pos = list_entry(pos->member.prev, typeof(*pos), member);	\
> +	     prefetch(pos->member.prev), &pos->member != (head);	\
> +	     pos = list_entry(pos->member.prev, typeof(*pos), member))
> +
> +/**
>   * list_for_each_entry_from -	iterate over list of given type
>   *			continuing from existing point
>   * @pos:	the type * to use as a loop counter.


---
~Randy

      reply	other threads:[~2006-05-18  4:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 18:50 Martin Peschke
2006-05-18  4:34 ` Randy.Dunlap [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=20060517213401.b97cc0ee.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=chase.venters@clientec.com \
    --cc=clameter@sgi.com \
    --cc=fche@redhat.com \
    --cc=hch@infradead.org \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mp3@de.ibm.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=peterc@gelato.unsw.edu.au \
    /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®