public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Jan Engelhardt <jengelh@computergmbh.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Kok, Auke" <auke-jan.h.kok@intel.com>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Joel Schopp <jschopp@austin.ibm.com>
Subject: Re: [PATCH] update checkpatch.pl to version 0.08
Date: Tue, 24 Jul 2007 19:30:12 +0100	[thread overview]
Message-ID: <46A64534.1040207@shadowen.org> (raw)
In-Reply-To: <20070724110339.9fd0853e.randy.dunlap@oracle.com>

Randy Dunlap wrote:
> On Tue, 24 Jul 2007 10:20:35 -0700 Randy Dunlap wrote:
> 
>> On Tue, 24 Jul 2007 18:51:39 +0200 (CEST) Jan Engelhardt wrote:
>>
>>> On Jul 24 2007 12:19, Andy Whitcroft wrote:
>>>>>>> if (err) {
>>>>>>>     do_something();
>>>>>>>     return -ERR;
>>>>>>> } else {
>>>>>>>     do_somthing_else();
>>>>>>> }
>>>>>> 	if (err) {
>>>>>> 		do_something();
>>>>>> 		return -ERR;
>>>>>> 	} else
>>>>>> 		do_something_else();
>>>>> The kool kids on linux-usb-devel largely ended up deciding that the second
>>>>> version looks dorky.
>>>> Ok, now if either the preceeding block or following block has {}'s then
>>>> we don't report this block for being one line long.  We will miss some
>>>> this way, but hey.
>>> As per Ingo Molnar [ http://lkml.org/lkml/2006/9/5/68 ],
>>> all blocks in an if-else 'tree' should be {} if there is at least one
>>> with more than two statements. (And I do not disagree.)
>> You are actually referring to this commit:
>>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e659ba4a0d2d471c0d73590f78e1a1b5a1eede48
>>
>> which did not appear on lkml for review... :(
> 
> Oops, I stand corrected (my previous search was based on the patch filename):
> 
> http://lkml.org/lkml/2007/5/4/50
> or
> http://marc.info/?l=linux-kernel&m=117826369817272&w=2

Well the summary of the discussion there was one vote for the new
standard, two votes against and a "lets leave it open".  So it seems odd
it was ever added to the CodingStyle.

The "leave it undefined" makes the current behaviour of checkpatch
wrong.  So its good I've loosened it for the next release.

-apw

  reply	other threads:[~2007-07-24 18:30 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-15  8:25 [PATCH] update checkpatch.pl to version 0.08 Andy Whitcroft
2007-07-23 23:08 ` Kok, Auke
2007-07-24  0:11   ` Randy Dunlap
2007-07-24  9:06   ` Andy Whitcroft
2007-07-24  9:15     ` Andrew Morton
2007-07-24 11:19       ` Andy Whitcroft
2007-07-24 13:08         ` Dmitry Torokhov
2007-07-24 16:51         ` Jan Engelhardt
2007-07-24 17:20           ` Randy Dunlap
2007-07-24 17:46             ` Jan Engelhardt
2007-07-24 18:03             ` Randy Dunlap
2007-07-24 18:30               ` Andy Whitcroft [this message]
2007-07-24 17:22       ` Paul Mundt
2007-07-24 18:00         ` Jan Engelhardt
2007-07-24 18:31           ` Andy Whitcroft
2007-07-24 19:49             ` Adrian Bunk
2007-07-24 20:32               ` jschopp
2007-07-25  1:13                 ` Adrian Bunk
2007-07-25 15:39                   ` SL Baur
2007-07-25 16:54                     ` Adrian Bunk
2007-07-24 18:45         ` jschopp
2007-07-24 19:59           ` Adrian Bunk
2007-07-24 20:53             ` jschopp
2007-07-23 23:13 ` Jesper Juhl
2007-07-23 23:36 ` Kok, Auke
2007-07-24 16:53   ` Jan Engelhardt
2007-07-24 17:06     ` Andy Whitcroft
2007-08-03 12:37     ` Andy Whitcroft
2007-07-23 23:52 ` Kok, Auke
2007-07-24 11:33   ` Andy Whitcroft
2007-07-24 11:47     ` Ingo Molnar
2007-07-24 11:51       ` Ingo Molnar
2007-07-24 16:56     ` Jan Engelhardt
2007-07-24 18:38       ` Andy Whitcroft
2007-07-24 13:58   ` jschopp
2007-07-24 14:33     ` Adrian Bunk
2007-07-24 14:50       ` Andy Whitcroft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A64534.1040207@shadowen.org \
    --to=apw@shadowen.org \
    --cc=akpm@linux-foundation.org \
    --cc=auke-jan.h.kok@intel.com \
    --cc=jengelh@computergmbh.de \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox