All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: Jan Hudec <bulb@ucw.cz>, Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 03/16] GFS: core fs
Date: Tue, 11 Oct 2005 09:55:52 -0500	[thread overview]
Message-ID: <20051011145552.GA8812@redhat.com> (raw)
In-Reply-To: <20051011121525.GC16249@djinn>

On Tue, Oct 11, 2005 at 02:15:25PM +0200, Jan Hudec wrote:
> On Mon, Oct 10, 2005 at 23:39:28 +0200, Pavel Machek wrote:

> > > + for (head = &ai->ai_ail1_list, tmp = head->prev, prev = tmp->prev;
> > > +      tmp != head;
> > > +      tmp = prev, prev = tmp->prev) {
> > 
> > 

> > > + for (head = &ai->ai_ail1_list, tmp = head->prev, prev = tmp->prev;
> > > +      tmp != head;
> > > +      tmp = prev, prev = tmp->prev) {
> > 
> > 
> > Can you get less creative in the for loops? [There are more examples
> > at other patches, for (i=something; i--; ) was "nicest" example].
> 
> The later two are good examples of where list_for_each_safe is
> appropriate.

There are multiple places like this that need either a
list_for_each_entry_reverse_safe or list_for_each_prev_safe, neither of
which exist.  I'll send a patch to add one.

I've just converted to a macro in ail2_empty() -- I'm not sure why I'd
left it out in that spot, maybe to be consistent with ail1_empty above.

Thanks,
Dave


      reply	other threads:[~2005-10-11 14:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-10 17:10 [PATCH 03/16] GFS: core fs David Teigland
2005-10-10 21:39 ` Pavel Machek
2005-10-11 12:15   ` Jan Hudec
2005-10-11 14:55     ` David Teigland [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=20051011145552.GA8812@redhat.com \
    --to=teigland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=bulb@ucw.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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.