lkml.org 
[lkml]   [2007]   [Jul]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 16 Jul 2007 17:01:51 -0700
FromGreg KH <>
SubjectRe: [PATCH] stacked ifs (was Re: [PATCH 02/12] handle multiple network paths to AoE device)
On Mon, Jul 16, 2007 at 03:31:55PM -0700, Andrew Morton wrote:
> On Mon, 16 Jul 2007 18:17:44 -0400
> "Ed L. Cashin" <ecashin@coraid.com> wrote:
> 
> > > ugh.  Do this:
> > > 
> > > 	do {
> > > 		if (t == d->htgt)
> > > 			continue;
> > > 		if (!(*t)->ifp->nd)
> > > 			continue;
> > > 		if ((*t)->nout >= (*t)->maxout)
> > > 			continue;
> > > 
> > > 		<stuff>
> > > 	} while (++t ...)
> > 
> > Do you think the "stacked ifs" in the first version above could be
> > accepted as a convenient extension to the K&R-based conventions in
> > Documentation/CodingStyle?
> 
> Maybe.  I don't recall seeing any kernel code which uses that convention:
> everyone uses &&.  So personally I'd prefer to see kernel code stick to the
> one convention, given that there is not, afacit, any significant advantage
> to the alternative one.

I agree, let's stick with the convention we already have and use
instead.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-17 02:17    [from the cache]
©2003-2008