[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.00.0802232040210.21332@woody.linux-foundation.org>
Date: Sat, 23 Feb 2008 20:47:44 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Newall <davidn@...idnewall.com>
cc: Pavel Machek <pavel@....cz>, Krzysztof Halasa <khc@...waw.pl>,
Jeff Garzik <jeff@...zik.org>, Adrian Bunk <bunk@...nel.org>,
Roland Dreier <rdreier@...co.com>,
Glenn Streiff <gstreiff@...Effect.com>,
Faisal Latif <flatif@...Effect.com>,
linux-kernel@...r.kernel.org, general@...ts.openfabrics.org,
Andrew Morton <akpm@...ux-foundation.org>,
Greg Kroah-Hartman <greg@...ah.com>
Subject: Re: Merging of completely unreviewed drivers
On Sun, 24 Feb 2008, David Newall wrote:
>
> > which talks more about what matters - too deep indentation.
>
> What's too deep? Is the following too deep?
It would be, if it weren't artificially so, for violates several kernel
coding standards, one being that the "case" labels indent with the switch,
not under it (the other being the placement of braces).
> (Yes, I know, "we don't indent 'case' because it consumes too much
> room."
No, that's not it at all. We don't indent 'case' because it matches with
the 'switch', not because of any room issues.
> That's inconsistent with the rest of normal indenting style, and
> a poor excuse to keep within an obsolete and unnecessary restriction.)
It's not at all inconsistent. It's just making clear how the parts of the
function group together.
Indenting a case-statement an extra level is as stupid as indenting "else"
one extra level from the "if ()" it goes together with. Do you think that
would be sane?
The fact that the 'case' thing is technically parsed as a separate
statement in C doesn't change anything.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists