]> err.no Git - linux-2.6/commitdiff
cpumask: statement expressions confuse some versions of gcc
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 29 Jul 2008 06:07:37 +0000 (16:07 +1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Jul 2008 17:35:49 +0000 (10:35 -0700)
when you take the address of the result.  Noticed on a sparc64 compile
using a version 3.4.5 cross compiler.

 kernel/time/tick-common.c: In function `tick_check_new_device':
 kernel/time/tick-common.c:210: error: invalid lvalue in unary `&'
 ...

Just make it a regular expression.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/cpumask.h

index 96d0509fb8d85a6ce9ba52842080df475fc1aef4..d3219d73f8e655f8d33f1b7e3af1a64ccfc2b3df 100644 (file)
@@ -287,7 +287,7 @@ static inline const cpumask_t *get_cpu_mask(unsigned int cpu)
  * gcc optimizes it out (it's a constant) and there's no huge stack
  * variable created:
  */
-#define cpumask_of_cpu(cpu) ({ *get_cpu_mask(cpu); })
+#define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu))
 
 
 #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)