On Fri, 20 Apr 2007 11:02:23 -0700 [EMAIL PROTECTED] wrote: > > The patch titled > CodingStyle: start flamewar about use of braces > has been added to the -mm tree. Its filename is > codingstyle-start-flamewar-about-use-of-braces.patch > > *** Remember to use Documentation/SubmitChecklist when testing your code *** > > See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find > out what to do about this > > ------------------------------------------------------ > Subject: CodingStyle: start flamewar about use of braces > From: Oliver Neukum <[EMAIL PROTECTED]> > > Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]> > Cc: Tilman Schmidt <[EMAIL PROTECTED]> > Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> > ---
Was this on lkml? I couldn't find it anywhere. I won't add an ack to it. No flames. > Documentation/CodingStyle | 15 +++++++++++++++ > 1 files changed, 15 insertions(+) > > diff -puN > Documentation/CodingStyle~codingstyle-start-flamewar-about-use-of-braces > Documentation/CodingStyle > --- a/Documentation/CodingStyle~codingstyle-start-flamewar-about-use-of-braces > +++ a/Documentation/CodingStyle > @@ -160,6 +160,21 @@ supply of new-lines on your screen is no > 25-line terminal screens here), you have more empty lines to put > comments on. > > +Do not unnecessarily use braces where a single statement will do. > + > +if (condition) > + action(); > + > +This does not apply if one branch of a conditional statement is a single > +statement. Use braces in both branches. > + > +if (condition) { > + do_this(); > + do_that(); > +} else { > + otherwise(); > +} > + > 3.1: Spaces > > Linux kernel style for use of spaces depends (mostly) on --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/