* Re: + codingstyle-start-flamewar-about-use-of-braces.patch added to -mm tree
[not found] <200704201802.l3KI2Nlh020621@shell0.pdx.osdl.net>
@ 2007-04-25 15:15 ` Randy Dunlap
0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2007-04-25 15:15 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, mm-commits, oliver, oneukum, tilman
On Fri, 20 Apr 2007 11:02:23 -0700 akpm@linux-foundation.org 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 <oliver@neukum.org>
>
> Signed-off-by: Oliver Neukum <oneukum@suse.de>
> Cc: Tilman Schmidt <tilman@imap.cc>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
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 ***
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-25 15:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200704201802.l3KI2Nlh020621@shell0.pdx.osdl.net>
2007-04-25 15:15 ` + codingstyle-start-flamewar-about-use-of-braces.patch added to -mm tree Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®