Mel Gorman bba3d8c3b3 [PARISC] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts
The following build error occured during a parisc build with
swap-over-NFS patches applied.

net/core/sock.c:274:36: error: initializer element is not constant
net/core/sock.c:274:36: error: (near initialization for 'memalloc_socks')
net/core/sock.c:274:36: error: initializer element is not constant

Dave Anglin says:
> 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.

The location of the above statement isn't fully clear, but if a compound
literal occurs outside the body of a function, the initializer list must
consist of constant expressions.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-25 09:08:46 +04:00
..
2009-03-13 01:18:56 -04:00
2011-07-26 16:49:47 -07:00
2012-06-05 14:10:17 +09:00
2012-03-20 21:48:30 +08:00
2009-01-05 19:11:05 +00:00
2012-03-28 18:30:02 +01:00
2011-09-27 18:08:04 +02:00
2012-03-28 18:30:02 +01:00
2011-03-31 11:26:23 -03:00
2009-12-16 07:20:12 -08:00
2012-03-28 18:30:02 +01:00
2009-12-16 03:48:54 +00:00
2009-03-13 01:20:48 -04:00
2010-10-07 14:08:55 +01:00
2012-03-28 18:30:02 +01:00
2010-06-09 11:12:36 +02:00
2011-07-26 16:49:47 -07:00
2012-02-23 20:19:04 -07:00
2012-03-28 18:30:02 +01:00
2011-07-26 16:49:43 -07:00
2009-02-01 11:01:27 +05:30
2009-09-27 23:07:23 -04:00
2012-03-28 18:30:02 +01:00
2012-01-03 22:55:17 -05:00
2011-07-31 18:18:08 -05:00