Re: [PATCH] stacked ifs (was Re: [PATCH 02/12] handle multiple network paths to AoE device)

Andrew Morton
2007-07-16T22:32:41Z

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.