Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Josh Triplett
On Fri, 2007-07-27 at 11:27 -0700, Andrew Morton wrote: > On Fri, 27 Jul 2007 10:05:16 -0700 > Josh Triplett <[EMAIL PROTECTED]> wrote: > > > > Sparse warnings... I think it shouldn't complain either, unless > > > called with extra parameter. > > > > Good point; Sparse shouldn't warn about this b

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Andrew Morton
On Fri, 27 Jul 2007 10:05:16 -0700 Josh Triplett <[EMAIL PROTECTED]> wrote: > > Sparse warnings... I think it shouldn't complain either, unless > > called with extra parameter. > > Good point; Sparse shouldn't warn about this by default. I've turned > that off in latest Sparse from Git, so you n

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Krzysztof Halasa
Josh Triplett <[EMAIL PROTECTED]> writes: > Perhaps, but > 1. Existing kernel style uses braces with single-statement > do-while. > 2. Linus prefers (or at least preferred in October of 2006) braces > with single-statement do-while. Fine with me, but it should IMHO be ma

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Stefan Richter
Andrew Morton wrote: > On Fri, 27 Jul 2007 09:41:01 +0200 Stefan Richter <[EMAIL PROTECTED]> wrote: ... >> SubmitChecklist already tells us to check with sparse before submission. > > rofl. First we have to talk everyone into checking their stuff with gcc. Ah, I forgot --- Real Submitters don't

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Josh Triplett
On Fri, 2007-07-27 at 18:00 +0200, Krzysztof Halasa wrote: > Andrew Morton <[EMAIL PROTECTED]> writes: > > > it's better that we all do things the same way. What that way _is_ is > > actually less important, unless it's something stupid, of course. > > It's certainly true WRT things like indenta

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Krzysztof Halasa
Andrew Morton <[EMAIL PROTECTED]> writes: > it's better that we all do things the same way. What that way _is_ is > actually less important, unless it's something stupid, of course. It's certainly true WRT things like indentation but IMHO it shouldn't go that far, and if it goes, it should be no

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Andrew Morton
On Fri, 27 Jul 2007 09:41:01 +0200 Stefan Richter <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > On Fri, 27 Jul 2007 02:42:58 +0200 Stefan Richter <[EMAIL PROTECTED]> wrote: > >> Besides, how about reorienting the CodingStyle text to the essential? > ... > > If sparse has gone and added a w

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-27 Thread Stefan Richter
Andrew Morton wrote: > On Fri, 27 Jul 2007 02:42:58 +0200 Stefan Richter <[EMAIL PROTECTED]> wrote: >> Besides, how about reorienting the CodingStyle text to the essential? ... > If sparse has gone and added a warning for this then it is more than > nitpicking. Reducing the amount of noise coming

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Randy Dunlap
On Fri, 27 Jul 2007 02:42:58 +0200 Stefan Richter wrote: > Krzysztof Halasa wrote: > > and even if I could, "always use" seems way too strong in this case. > > Besides, how about reorienting the CodingStyle text to the essential? I don't mind that. Send patch(es). > (But leave the humorous lan

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Andrew Morton
On Fri, 27 Jul 2007 02:42:58 +0200 Stefan Richter <[EMAIL PROTECTED]> wrote: > Krzysztof Halasa wrote: > > and even if I could, "always use" seems way too strong in this case. > > Besides, how about reorienting the CodingStyle text to the essential? > > (But leave the humorous language in --- th

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Stefan Richter
Krzysztof Halasa wrote: > and even if I could, "always use" seems way too strong in this case. Besides, how about reorienting the CodingStyle text to the essential? (But leave the humorous language in --- the few parts that are inherited from old versions of that file, now more and more being bur

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Andrew Morton
On Fri, 27 Jul 2007 02:18:34 +0200 Krzysztof Halasa <[EMAIL PROTECTED]> wrote: > Josh Triplett <[EMAIL PROTECTED]> writes: > > > +This also does not apply to a do-while loop; always use braces with a > > do-while, > > +even if it contains a single statement: > > I can't see anything wrong with

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Krzysztof Halasa
Josh Triplett <[EMAIL PROTECTED]> writes: > +This also does not apply to a do-while loop; always use braces with a > do-while, > +even if it contains a single statement: I can't see anything wrong with do abc; while (xyz); and even if I could, "always use" seems way too strong in this

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Josh Triplett
On Thu, 2007-07-26 at 14:44 -0700, Andrew Morton wrote: > On Thu, 26 Jul 2007 14:37:02 -0700 Josh Triplett <[EMAIL PROTECTED]> wrote: > > > Sparse warns about do-while loops without braces; Linus's rationale from the > > Sparse Git changelog: > > > Add warning message for naked do-while > > > > >

Re: [PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Andrew Morton
On Thu, 26 Jul 2007 14:37:02 -0700 Josh Triplett <[EMAIL PROTECTED]> wrote: > Sparse warns about do-while loops without braces; Linus's rationale from the > Sparse Git changelog: > > Add warning message for naked do-while > > > > Does it necessarily make sense? Dunno, but it does tend to be bad >

[PATCH] CodingStyle: proscribe do-while without braces.

2007-07-26 Thread Josh Triplett
Sparse warns about do-while loops without braces; Linus's rationale from the Sparse Git changelog: > Add warning message for naked do-while > > Does it necessarily make sense? Dunno, but it does tend to be bad > practice, or at least result in code that can be hard to mentally parse. > > Maybe that