Commit 7ce3f0f7 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix gcc-3.4 warning in percpu code

From: Rusty Russell <rusty@rustcorp.com.au>

It's complaining about:

#define per_cpu(var, cpu)			((void)cpu, per_cpu__##var)

There are several ways of fixing this, but the simplest is:

#define per_cpu(var, cpu)			(*((void)cpu, &per_cpu__##var))
parent 96aae355
...@@ -29,7 +29,7 @@ do { \ ...@@ -29,7 +29,7 @@ do { \
#define DEFINE_PER_CPU(type, name) \ #define DEFINE_PER_CPU(type, name) \
__typeof__(type) per_cpu__##name __typeof__(type) per_cpu__##name
#define per_cpu(var, cpu) ((void)cpu, per_cpu__##var) #define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var))
#define __get_cpu_var(var) per_cpu__##var #define __get_cpu_var(var) per_cpu__##var
#endif /* SMP */ #endif /* SMP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment