Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Joe Perches
On Mon, 2014-11-03 at 10:05 -0800, Josh Triplett wrote: > On Mon, Nov 03, 2014 at 09:47:40AM -0800, Joe Perches wrote: [] > "don't put an else after an if condition > ending with break or return; Maybe that's a bit _too_ simple. Yes for a simple if, but not necessarily an else if if

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Josh Triplett
On Mon, Nov 03, 2014 at 09:47:40AM -0800, Joe Perches wrote: > On Mon, 2014-11-03 at 11:46 -0500, Jonathan Corbet wrote: > > On Wed, 29 Oct 2014 11:15:17 -0700 > > Josh Triplett wrote: > > > > > Document several common practices and conventions regarding conditional > > > compilation, most

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Joe Perches
On Mon, 2014-11-03 at 11:46 -0500, Jonathan Corbet wrote: > On Wed, 29 Oct 2014 11:15:17 -0700 > Josh Triplett wrote: > > > Document several common practices and conventions regarding conditional > > compilation, most notably the preference for ifdefs in headers rather > > than .c files. > >

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Jonathan Corbet
On Wed, 29 Oct 2014 11:15:17 -0700 Josh Triplett wrote: > Document several common practices and conventions regarding conditional > compilation, most notably the preference for ifdefs in headers rather > than .c files. OK, I've picked this one up for my 3.19 docs pull. Thanks, jon -- To

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Jonathan Corbet
On Wed, 29 Oct 2014 11:15:17 -0700 Josh Triplett j...@joshtriplett.org wrote: Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than .c files. OK, I've picked this one up for my 3.19 docs pull.

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Joe Perches
On Mon, 2014-11-03 at 11:46 -0500, Jonathan Corbet wrote: On Wed, 29 Oct 2014 11:15:17 -0700 Josh Triplett j...@joshtriplett.org wrote: Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than .c

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Josh Triplett
On Mon, Nov 03, 2014 at 09:47:40AM -0800, Joe Perches wrote: On Mon, 2014-11-03 at 11:46 -0500, Jonathan Corbet wrote: On Wed, 29 Oct 2014 11:15:17 -0700 Josh Triplett j...@joshtriplett.org wrote: Document several common practices and conventions regarding conditional compilation,

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Joe Perches
On Mon, 2014-11-03 at 10:05 -0800, Josh Triplett wrote: On Mon, Nov 03, 2014 at 09:47:40AM -0800, Joe Perches wrote: [] don't put an else after an if condition ending with break or return; Maybe that's a bit _too_ simple. Yes for a simple if, but not necessarily an else if if (foo) {

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Martin Kelly
On 10/29/2014 11:15 AM, Josh Triplett wrote: > Document several common practices and conventions regarding conditional > compilation, most notably the preference for ifdefs in headers rather > than .c files. > > Signed-off-by: Josh Triplett > --- > > I found myself explaining a few of these

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Josh Triplett
On Wed, Oct 29, 2014 at 05:35:02PM -0700, Randy Dunlap wrote: > On 10/29/14 12:12, Geert Uytterhoeven wrote: > > On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett > > wrote: > >> Document several common practices and conventions regarding conditional > >> compilation, most notably the preference

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Randy Dunlap
On 10/29/14 12:12, Geert Uytterhoeven wrote: > On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett wrote: >> Document several common practices and conventions regarding conditional >> compilation, most notably the preference for ifdefs in headers rather >> than .c files. >> >> Signed-off-by: Josh

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Josh Triplett
On Wed, Oct 29, 2014 at 08:12:49PM +0100, Geert Uytterhoeven wrote: > On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett wrote: > > Document several common practices and conventions regarding conditional > > compilation, most notably the preference for ifdefs in headers rather > > than .c files. > >

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Geert Uytterhoeven
On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett wrote: > Document several common practices and conventions regarding conditional > compilation, most notably the preference for ifdefs in headers rather > than .c files. > > Signed-off-by: Josh Triplett > +If you have a function or variable which

[PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Josh Triplett
Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than .c files. Signed-off-by: Josh Triplett --- I found myself explaining a few of these unwritten rules in patch feedback, so I figured I'd document

[PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Josh Triplett
Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than .c files. Signed-off-by: Josh Triplett j...@joshtriplett.org --- I found myself explaining a few of these unwritten rules in patch feedback, so I

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Geert Uytterhoeven
On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett j...@joshtriplett.org wrote: Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than .c files. Signed-off-by: Josh Triplett j...@joshtriplett.org +If you

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Josh Triplett
On Wed, Oct 29, 2014 at 08:12:49PM +0100, Geert Uytterhoeven wrote: On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett j...@joshtriplett.org wrote: Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Randy Dunlap
On 10/29/14 12:12, Geert Uytterhoeven wrote: On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett j...@joshtriplett.org wrote: Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than .c files. Signed-off-by:

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Josh Triplett
On Wed, Oct 29, 2014 at 05:35:02PM -0700, Randy Dunlap wrote: On 10/29/14 12:12, Geert Uytterhoeven wrote: On Wed, Oct 29, 2014 at 7:15 PM, Josh Triplett j...@joshtriplett.org wrote: Document several common practices and conventions regarding conditional compilation, most notably the

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-10-29 Thread Martin Kelly
On 10/29/2014 11:15 AM, Josh Triplett wrote: Document several common practices and conventions regarding conditional compilation, most notably the preference for ifdefs in headers rather than .c files. Signed-off-by: Josh Triplett j...@joshtriplett.org --- I found myself explaining a few