Jan Beulich 8c87df457c BUILD_BUG_ON(): fix it and a couple of bogus uses of it
gcc permitting variable length arrays makes the current construct used for
BUILD_BUG_ON() useless, as that doesn't produce any diagnostic if the
controlling expression isn't really constant.  Instead, this patch makes
it so that a bit field gets used here.  Consequently, those uses where the
condition isn't really constant now also need fixing.

Note that in the gfp.h, kmemcheck.h, and virtio_config.h cases
MAYBE_BUILD_BUG_ON() really just serves documentation purposes - even if
the expression is compile time constant (__builtin_constant_p() yields
true), the array is still deemed of variable length by gcc, and hence the
whole expression doesn't have the intended effect.

[akpm@linux-foundation.org: make arch/sparc/include/asm/vio.h compile]
[akpm@linux-foundation.org: more nonsensical assertions in tpm.c..]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Cc: Mimi Zohar <zohar@us.ibm.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:29 -07:00
..
2009-06-11 08:51:01 -07:00
2009-09-22 07:17:42 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00
2008-06-20 14:05:55 -06:00
2008-12-13 11:25:49 -08:00
2008-10-20 08:52:41 -07:00
2008-12-13 09:12:07 +00:00
2009-06-19 16:46:06 -07:00
2009-09-21 15:14:58 +02:00
2008-07-20 17:12:36 -07:00
2008-06-20 14:05:57 -06:00
2009-06-18 11:16:55 +10:00
2009-01-02 10:28:32 -08:00
2009-07-12 12:22:34 -07:00
2009-09-15 08:42:00 -07:00
2008-02-07 08:42:25 -08:00
2009-09-23 07:39:29 -07:00
2009-07-12 12:22:34 -07:00
2008-04-30 08:29:43 -07:00
2008-07-24 10:47:14 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00
2009-07-20 16:38:43 -07:00
2007-02-12 09:48:30 -08:00
2009-06-18 13:03:54 -07:00
2009-09-19 13:13:37 -07:00
2008-07-20 17:12:38 -07:00
2009-07-12 12:22:34 -07:00
2009-01-08 16:44:03 -07:00
2009-02-22 09:23:02 -08:00
2009-06-11 08:51:01 -07:00
2009-09-14 17:41:42 -07:00
2009-03-16 08:34:35 -06:00
2008-07-20 17:12:38 -07:00
2009-07-12 12:22:34 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-07-03 15:45:29 +01:00
2008-06-20 14:05:51 -06:00
2008-04-30 23:15:34 +02:00
2009-06-11 08:51:02 -07:00
2009-09-19 13:13:35 -07:00
2009-09-19 13:13:36 -07:00
2009-09-19 13:13:35 -07:00