Re: [PATCH] Documentation/CodingStyle: Mention multi-line macros using expressions

2012-07-13 Thread Robert P. J. Day
On Wed, 11 Jul 2012, Joe Perches wrote: > On Wed, 2012-07-11 at 13:32 -0400, Robert P. J. Day wrote: > [] > > diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle > [] > > +A newer technique is to use the GCC extension of being able to place > > +statements and declarations in an

Re: [PATCH] Documentation/CodingStyle: Mention multi-line macros using expressions

2012-07-13 Thread Robert P. J. Day
On Wed, 11 Jul 2012, Joe Perches wrote: On Wed, 2012-07-11 at 13:32 -0400, Robert P. J. Day wrote: [] diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle [] +A newer technique is to use the GCC extension of being able to place +statements and declarations in an expression,

Re: [PATCH] Documentation/CodingStyle: Mention multi-line macros using expressions

2012-07-11 Thread Joe Perches
On Wed, 2012-07-11 at 13:32 -0400, Robert P. J. Day wrote: [] > diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle [] > +A newer technique is to use the GCC extension of being able to place > +statements and declarations in an expression, as with this example from > +the header

[PATCH] Documentation/CodingStyle: Mention multi-line macros using expressions

2012-07-11 Thread Robert P. J. Day
Since defining multi-line macros using statements and declarations in expressions is fairly common in the kernel, add this to CodingStyle. Signed-off-by: Robert P. J. Day --- diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index cb9258b..7eb0734 100644 ---

[PATCH] Documentation/CodingStyle: Mention multi-line macros using expressions

2012-07-11 Thread Robert P. J. Day
Since defining multi-line macros using statements and declarations in expressions is fairly common in the kernel, add this to CodingStyle. Signed-off-by: Robert P. J. Day rpj...@crashcourse.ca --- diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index cb9258b..7eb0734 100644

Re: [PATCH] Documentation/CodingStyle: Mention multi-line macros using expressions

2012-07-11 Thread Joe Perches
On Wed, 2012-07-11 at 13:32 -0400, Robert P. J. Day wrote: [] diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle [] +A newer technique is to use the GCC extension of being able to place +statements and declarations in an expression, as with this example from +the linux/kernel.h