lkml.org 
[lkml]   [2005]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/16] GFS: core fs
On Mon, Oct 10, 2005 at 23:39:28 +0200, Pavel Machek wrote:
> Hi!
>
> > Signed-off-by: Ken Preslan <ken@preslan.org>
> > Signed-off-by: David Teigland <teigland@redhat.com>
>
> > + for (; blks; gfs2_replay_incr_blk(sdp, &start), blks--) {
>
> > + 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.

--
Jan 'Bulb' Hudec <bulb@ucw.cz>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-10-11 14:18    [W:0.029 / U:1.720 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site