Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Robert P. J. Day
On Thu, 14 Dec 2006, Randy Dunlap wrote: > On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote: > > > On Thu, 14 Dec 2006, Randy Dunlap wrote: > > > > > David Weinehall wrote: > > > > On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: > > > > > > > > [snip] > > > > > > > >

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Randy Dunlap
On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote: > On Thu, 14 Dec 2006, Randy Dunlap wrote: > > > David Weinehall wrote: > > > On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: > > > > > > [snip] > > > > > > > +but no space after unary operators: > > > > +

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Robert P. J. Day
On Thu, 14 Dec 2006, Randy Dunlap wrote: > David Weinehall wrote: > > On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: > > > > [snip] > > > > > +but no space after unary operators: > > > + sizeof ++ -- & * + - ~ ! defined > > > > Uhm, that doesn't compute... If you

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Scott Preece
On 12/14/06, Randy Dunlap <[EMAIL PROTECTED]> wrote: Scott Preece wrote: [1] >> Outside of comments, documentation and except in Kconfig, spaces are >> never >> used for indentation, and the above example is deliberately broken. > --- > > I realize it isn't text you added, but what's that

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Randy Dunlap
Scott Preece wrote: [1] Outside of comments, documentation and except in Kconfig, spaces are never used for indentation, and the above example is deliberately broken. --- I realize it isn't text you added, but what's that supposed to mean? Surely the 8-character indents are made up of

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Scott Preece
Outside of comments, documentation and except in Kconfig, spaces are never used for indentation, and the above example is deliberately broken. --- I realize it isn't text you added, but what's that supposed to mean? Surely the 8-character indents are made up of spaces. Does it mean "spaces

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread David Weinehall
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: [snip] > +but no space after unary operators: > + sizeof ++ -- & * + - ~ ! defined Uhm, that doesn't compute... If you don't put a space after sizeof, the program won't compile. int c; printf("%d", sizeofc);

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Randy Dunlap
David Weinehall wrote: On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: [snip] +but no space after unary operators: + sizeof ++ -- & * + - ~ ! defined Uhm, that doesn't compute... If you don't put a space after sizeof, the program won't compile. int c;

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Randy Dunlap
David Weinehall wrote: On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: [snip] +but no space after unary operators: + sizeof ++ --* + - ~ ! defined Uhm, that doesn't compute... If you don't put a space after sizeof, the program won't compile. int c;

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread David Weinehall
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: [snip] +but no space after unary operators: + sizeof ++ --* + - ~ ! defined Uhm, that doesn't compute... If you don't put a space after sizeof, the program won't compile. int c; printf(%d, sizeofc);

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Scott Preece
Outside of comments, documentation and except in Kconfig, spaces are never used for indentation, and the above example is deliberately broken. --- I realize it isn't text you added, but what's that supposed to mean? Surely the 8-character indents are made up of spaces. Does it mean spaces

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Randy Dunlap
Scott Preece wrote: [1] Outside of comments, documentation and except in Kconfig, spaces are never used for indentation, and the above example is deliberately broken. --- I realize it isn't text you added, but what's that supposed to mean? Surely the 8-character indents are made up of

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Scott Preece
On 12/14/06, Randy Dunlap [EMAIL PROTECTED] wrote: Scott Preece wrote: [1] Outside of comments, documentation and except in Kconfig, spaces are never used for indentation, and the above example is deliberately broken. --- I realize it isn't text you added, but what's that supposed to

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Robert P. J. Day
On Thu, 14 Dec 2006, Randy Dunlap wrote: David Weinehall wrote: On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: [snip] +but no space after unary operators: + sizeof ++ --* + - ~ ! defined Uhm, that doesn't compute... If you don't put a space

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Randy Dunlap
On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote: On Thu, 14 Dec 2006, Randy Dunlap wrote: David Weinehall wrote: On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: [snip] +but no space after unary operators: + sizeof ++ --*

Re: [PATCH/RFC] CodingStyle updates

2006-12-14 Thread Robert P. J. Day
On Thu, 14 Dec 2006, Randy Dunlap wrote: On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote: On Thu, 14 Dec 2006, Randy Dunlap wrote: David Weinehall wrote: On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote: [snip] +but no space after unary

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jan Engelhardt
On Dec 7 2006 15:00, Randy Dunlap wrote: > >> > +but no space after unary operators: >> > + sizeof ++ -- & * + - ~ ! defined >> >> You could mention typeof too, which is a keyword but should be done like >> sizeof. > > Hm, is that a gcc-ism? It's not listed in the C99 spec. >

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
On Thu, 07 Dec 2006 15:06:35 -0800 (PST) David Miller wrote: > From: Randy Dunlap <[EMAIL PROTECTED]> > Date: Thu, 07 Dec 2006 15:00:31 -0800 > > > Alistair John Strachan wrote: > > > > >> +but no space after unary operators: > > >> +sizeof ++ -- & * + - ~ ! defined > >

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread David Miller
From: Randy Dunlap <[EMAIL PROTECTED]> Date: Thu, 07 Dec 2006 15:00:31 -0800 > Alistair John Strachan wrote: > > >> +but no space after unary operators: > >> + sizeof ++ -- & * + - ~ ! defined > > > > You could mention typeof too, which is a keyword but should be done like >

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
Alistair John Strachan wrote: +but no space after unary operators: + sizeof ++ -- & * + - ~ ! defined You could mention typeof too, which is a keyword but should be done like sizeof. Hm, is that a gcc-ism? It's not listed in the C99 spec. Are there other gcc-isms

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Alistair John Strachan
Hi Randy, On Thursday 07 December 2006 08:48, Randy Dunlap wrote: [snip] > + 3.1: Spaces > + > +Linux kernel style for use of spaces depends (mostly) on > +function-versus-keyword usage. Use a space after (most) keywords. > +The notable exception is "sizeof", which looks like a

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
Jan Engelhardt wrote: On Dec 7 2006 00:48, Randy Dunlap wrote: +The preferred way to ease multiple indentation levels in a switch +statement is to align the "switch" and its subordinate "case" labels in +the same column instead of "double-indenting" the "case" labels. E.g.: + + switch

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
Jan Engelhardt wrote: What keyword is "defined"? Did you have too much Perl coffee? :) Maybe macro formatting? #if defined(CONFIG_FOO) Yes, that's it. Ah thanks for the hint. This also raises another stylistic aspect: #ifdef XYZ over #if defined(XYZ) when there is only one macro to be

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jan Engelhardt
>> What keyword is "defined"? Did you have too much Perl coffee? :) > > Maybe macro formatting? > > #if defined(CONFIG_FOO) Ah thanks for the hint. This also raises another stylistic aspect: #ifdef XYZ over #if defined(XYZ) when there is only one macro to be tested for. -`J' -- - To

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Chris Friesen
Jan Engelhardt wrote: What keyword is "defined"? Did you have too much Perl coffee? :) Maybe macro formatting? #if defined(CONFIG_FOO) Chris - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jan Engelhardt
On Dec 7 2006 00:48, Randy Dunlap wrote: >+The preferred way to ease multiple indentation levels in a switch >+statement is to align the "switch" and its subordinate "case" labels in >+the same column instead of "double-indenting" the "case" labels. E.g.: >+ >+ switch (suffix) { >+

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jesper Juhl
On 07/12/06, Randy Dunlap <[EMAIL PROTECTED]> wrote: 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 - add paragraph on multiple-assignments - add

[PATCH/RFC] 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 - add paragraph on multiple-assignments - add more on Braces - add section on Spaces - add paragraph

[PATCH/RFC] 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 - add paragraph on multiple-assignments - add more on Braces - add section on Spaces - add paragraph

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jesper Juhl
On 07/12/06, Randy Dunlap [EMAIL PROTECTED] wrote: 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 - add paragraph on multiple-assignments - add

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jan Engelhardt
On Dec 7 2006 00:48, Randy Dunlap wrote: +The preferred way to ease multiple indentation levels in a switch +statement is to align the switch and its subordinate case labels in +the same column instead of double-indenting the case labels. E.g.: + + switch (suffix) { + case 'G': +

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Chris Friesen
Jan Engelhardt wrote: What keyword is defined? Did you have too much Perl coffee? :) Maybe macro formatting? #if defined(CONFIG_FOO) Chris - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jan Engelhardt
What keyword is defined? Did you have too much Perl coffee? :) Maybe macro formatting? #if defined(CONFIG_FOO) Ah thanks for the hint. This also raises another stylistic aspect: #ifdef XYZ over #if defined(XYZ) when there is only one macro to be tested for. -`J' -- - To

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
Jan Engelhardt wrote: On Dec 7 2006 00:48, Randy Dunlap wrote: +The preferred way to ease multiple indentation levels in a switch +statement is to align the switch and its subordinate case labels in +the same column instead of double-indenting the case labels. E.g.: + + switch (suffix) {

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
Jan Engelhardt wrote: What keyword is defined? Did you have too much Perl coffee? :) Maybe macro formatting? #if defined(CONFIG_FOO) Yes, that's it. Ah thanks for the hint. This also raises another stylistic aspect: #ifdef XYZ over #if defined(XYZ) when there is only one macro to be

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Alistair John Strachan
Hi Randy, On Thursday 07 December 2006 08:48, Randy Dunlap wrote: [snip] + 3.1: Spaces + +Linux kernel style for use of spaces depends (mostly) on +function-versus-keyword usage. Use a space after (most) keywords. +The notable exception is sizeof, which looks like a function

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
Alistair John Strachan wrote: +but no space after unary operators: + sizeof ++ --* + - ~ ! defined You could mention typeof too, which is a keyword but should be done like sizeof. Hm, is that a gcc-ism? It's not listed in the C99 spec. Are there other gcc-isms

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread David Miller
From: Randy Dunlap [EMAIL PROTECTED] Date: Thu, 07 Dec 2006 15:00:31 -0800 Alistair John Strachan wrote: +but no space after unary operators: + sizeof ++ --* + - ~ ! defined You could mention typeof too, which is a keyword but should be done like sizeof. Hm,

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Randy Dunlap
On Thu, 07 Dec 2006 15:06:35 -0800 (PST) David Miller wrote: From: Randy Dunlap [EMAIL PROTECTED] Date: Thu, 07 Dec 2006 15:00:31 -0800 Alistair John Strachan wrote: +but no space after unary operators: +sizeof ++ --* + - ~ ! defined You could

Re: [PATCH/RFC] CodingStyle updates

2006-12-07 Thread Jan Engelhardt
On Dec 7 2006 15:00, Randy Dunlap wrote: +but no space after unary operators: + sizeof ++ --* + - ~ ! defined You could mention typeof too, which is a keyword but should be done like sizeof. Hm, is that a gcc-ism? It's not listed in the C99 spec. Are there other