2.6.20-rc1-mm1 suspicious prececence code ( was Re: [PATCH/v2] CodingStyle updates

2006-12-19 Thread Valdis . Kletnieks
On Fri, 15 Dec 2006 22:59:12 +0100, Jan Engelhardt said: > I take it that people will automatically DTRT for obscure cases like > shown before. Well, and if they don't, hopefully some reviewer catches > things like 3*i + l<<2. So I hacked up a few very ugly 'find|egrep' to look for some cases of

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Jan Engelhardt
On Dec 15 2006 21:27, Jörn Engel wrote: >On Fri, 15 December 2006 22:01:10 +0100, Jan Engelhardt wrote: >> On Dec 15 2006 15:56, Dmitry Torokhov wrote: >> > >> > outside the loop? If not then it is better to keep style consistent >> > and not use condensed form in loops either. >> >> Don't you al

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Jörn Engel
On Fri, 15 December 2006 22:01:10 +0100, Jan Engelhardt wrote: > On Dec 15 2006 15:56, Dmitry Torokhov wrote: > > > > Would you write: > > > > i+=2; > > > > outside the loop? If not then it is better to keep style consistent > > and not use condensed form in loops either. > > Don't you all ev

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Randy Dunlap
Jörn Engel wrote: On Fri, 15 December 2006 21:10:14 +, Jörn Engel wrote: Like so? I manually edited the patch and weakened a few of the space rules, basically the ones in dispute in this thread. Btw, this doesn't apply to my git tree at all (just pulled): Hunk #1 FAILED at 35. Hunk #2 FAI

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Jörn Engel
On Fri, 15 December 2006 12:26:59 -0800, Randy Dunlap wrote: > > then send patches :) Like so? I manually edited the patch and weakened a few of the space rules, basically the ones in dispute in this thread. From: Randy Dunlap <[EMAIL PROTECTED]> Add some kernel coding style comments, mostly

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Jörn Engel
On Fri, 15 December 2006 21:10:14 +, Jörn Engel wrote: > > Like so? I manually edited the patch and weakened a few of the space > rules, basically the ones in dispute in this thread. Btw, this doesn't apply to my git tree at all (just pulled): Hunk #1 FAILED at 35. Hunk #2 FAILED at 94. Hunk

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Jan Engelhardt
On Dec 15 2006 15:56, Dmitry Torokhov wrote: > On 12/15/06, Jörn Engel <[EMAIL PROTECTED]> wrote: >> On Fri, 15 December 2006 09:00:37 -0800, Randy Dunlap wrote: >> > On Fri, 15 Dec 2006 16:07:17 +0100 Pavel Machek wrote: >> > >> > > Not in simple cases. >> > > >> > > 3*i + 2*j should be writen

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Dmitry Torokhov
On 12/15/06, Jörn Engel <[EMAIL PROTECTED]> wrote: On Fri, 15 December 2006 09:00:37 -0800, Randy Dunlap wrote: > On Fri, 15 Dec 2006 16:07:17 +0100 Pavel Machek wrote: > > > Not in simple cases. > > > > 3*i + 2*j should be writen like that. Not like > > (3 * i) + (2 * j) > > I would just

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Rafael J. Wysocki
On Friday, 15 December 2006 18:00, Randy Dunlap wrote: > On Fri, 15 Dec 2006 16:07:17 +0100 Pavel Machek wrote: > > > On Fri 2006-12-15 08:52:22, Scott Preece wrote: > > > On 12/15/06, Pavel Machek <[EMAIL PROTECTED]> wrote: > > > >Hi! > > > > > > > >> Pavel Machek wrote: > > > >> >> From: Randy D

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Randy Dunlap
On Fri, 15 Dec 2006 20:11:27 + Jörn Engel wrote: > On Fri, 15 December 2006 09:00:37 -0800, Randy Dunlap wrote: > > On Fri, 15 Dec 2006 16:07:17 +0100 Pavel Machek wrote: > > > > > Not in simple cases. > > > > > > 3*i + 2*j should be writen like that. Not like > > > (3 * i) + (2 * j) > >

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Jörn Engel
On Fri, 15 December 2006 09:00:37 -0800, Randy Dunlap wrote: > On Fri, 15 Dec 2006 16:07:17 +0100 Pavel Machek wrote: > > > Not in simple cases. > > > > 3*i + 2*j should be writen like that. Not like > > (3 * i) + (2 * j) > > I would just write it as: > 3 * i + 2 * j So would I.

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Jan Engelhardt
On Dec 15 2006 15:28, Stefan Richter wrote: >Pavel Machek wrote: >>> Pavel Machek wrote: >>> >> From: Randy Dunlap <[EMAIL PROTECTED]> >>> >> +Use one space around (on each side of) most binary and ternary >>> >> operators, >>> >> +such as any of these: >>> >> += + - < > * / % |

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Randy Dunlap
On Fri, 15 Dec 2006 15:28:44 +0100 Stefan Richter wrote: > Pavel Machek wrote: > >> Pavel Machek wrote: > >> >> From: Randy Dunlap <[EMAIL PROTECTED]> > >> >> +Use one space around (on each side of) most binary and ternary > >> >> operators, > >> >> +such as any of these: > >> >> + = + -

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Randy Dunlap
On Fri, 15 Dec 2006 16:07:17 +0100 Pavel Machek wrote: > On Fri 2006-12-15 08:52:22, Scott Preece wrote: > > On 12/15/06, Pavel Machek <[EMAIL PROTECTED]> wrote: > > >Hi! > > > > > >> Pavel Machek wrote: > > >> >> From: Randy Dunlap <[EMAIL PROTECTED]> > > >> >> +Use one space around (on each side

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Scott Preece
On 12/15/06, Pavel Machek <[EMAIL PROTECTED]> wrote: On Fri 2006-12-15 08:52:22, Scott Preece wrote > > I think the mistake illuminates why parentheses should be the rule. If > you're thinking about using spacing to convey grouping, use > parentheses instead... Not in simple cases. 3*i

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Pavel Machek
On Fri 2006-12-15 08:52:22, Scott Preece wrote: > On 12/15/06, Pavel Machek <[EMAIL PROTECTED]> wrote: > >Hi! > > > >> Pavel Machek wrote: > >> >> From: Randy Dunlap <[EMAIL PROTECTED]> > >> >> +Use one space around (on each side of) most binary and ternary > >operators, > >> >> +such as any of th

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Stefan Richter
Scott Preece wrote: > I think the mistake illuminates why parentheses should be the rule. If > you're thinking about using spacing to convey grouping, use > parentheses instead... But then, we do reflect operator precedence by omitting whitespace around . and ->, before [], or after unary & and *.

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Scott Preece
On 12/15/06, Pavel Machek <[EMAIL PROTECTED]> wrote: Hi! > Pavel Machek wrote: > >> From: Randy Dunlap <[EMAIL PROTECTED]> > >> +Use one space around (on each side of) most binary and ternary operators, > >> +such as any of these: > >> + = + - < > * / % | & ^ <= >= == != ? : > >

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Stefan Richter
Pavel Machek wrote: >> Pavel Machek wrote: >> >> From: Randy Dunlap <[EMAIL PROTECTED]> >> >> +Use one space around (on each side of) most binary and ternary operators, >> >> +such as any of these: >> >> + = + - < > * / % | & ^ <= >= == != ? : >> > >> > Actually, this should not be

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Pavel Machek
Hi! > Pavel Machek wrote: > >> From: Randy Dunlap <[EMAIL PROTECTED]> > >> +Use one space around (on each side of) most binary and ternary operators, > >> +such as any of these: > >> + = + - < > * / % | & ^ <= >= == != ? : > > > > Actually, this should not be hard rule. We want t

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Stefan Richter
Pavel Machek wrote: >> From: Randy Dunlap <[EMAIL PROTECTED]> >> +Use one space around (on each side of) most binary and ternary operators, >> +such as any of these: >> += + - < > * / % | & ^ <= >= == != ? : > > Actually, this should not be hard rule. We want to allow > >

Re: [PATCH/v2] CodingStyle updates

2006-12-15 Thread Pavel Machek
Hi! > From: Randy Dunlap <[EMAIL PROTECTED]> > > Add some kernel coding style comments, mostly pulled from emails > by Andrew Morton, Jesper Juhl, and Randy Dunlap. ... > Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]> > Acked-by: Jesper Juhl <[EMAIL PROTECTED]> ACK. > +Use one space around (on

Re: [PATCH/v2] CodingStyle updates

2006-12-08 Thread Jan Engelhardt
On Dec 7 2006 16:55, Randy Dunlap wrote: >Date: Thu, 7 Dec 2006 16:55:08 -0800 >From: Randy Dunlap <[EMAIL PROTECTED]> >To: lkml >Cc: [EMAIL PROTECTED], akpm <[EMAIL PROTECTED]> >Subject: [PATCH/v2] CodingStyle updates > >From: Randy Dunlap <[EMAIL PROTECT

[PATCH/v2] CodingStyle updates

2006-12-07 Thread Randy Dunlap
From: Randy Dunlap <[EMAIL PROTECTED]> Add some kernel coding style comments, mostly pulled from emails by Andrew Morton, Jesper Juhl, and Randy Dunlap. - add paragraph on switch/case indentation (with fixes) - add paragraph on multiple-assignments - add more on Braces - add section on Spaces; ad