Message ID | 1343193053.3139.6.camel@dabdike (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Tue, Jul 24, 2012 at 10:10 PM, James Bottomley <James.Bottomley@hansenpartnership.com> wrote: >> Here is the line in sock.i: >> >> struct static_key memalloc_socks = ((struct static_key) { .enabled = >> ((atomic_t) { (0) }) }); > > The above line contains two compound literals. It also uses a designated > initializer to initialize the field enabled. A compound literal is not a > constant expression. Seeing the same thing on ia64 building next-20120726. Same fix works for me ... so I'll steal this whole changelog and attributes. -Tony -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index 6c6defc..af9cf30 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h @@ -141,7 +141,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) #define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0) -#define ATOMIC_INIT(i) ((atomic_t) { (i) }) +#define ATOMIC_INIT(i) { (i) } #define smp_mb__before_atomic_dec() smp_mb() #define smp_mb__after_atomic_dec() smp_mb() @@ -150,7 +150,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) #ifdef CONFIG_64BIT -#define ATOMIC64_INIT(i) ((atomic64_t) { (i) }) +#define ATOMIC64_INIT(i) { (i) } static __inline__ s64 __atomic64_add_return(s64 i, atomic64_t *v)