linux/arch/sparc
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
..
boot sparc64: build compressed image (zImage) by default 2009-08-16 18:21:47 -07:00
configs sparc: Update defconfigs. 2009-09-16 00:31:26 -07:00
include/asm BUILD_BUG_ON(): fix it and a couple of bogus uses of it 2009-09-23 07:39:29 -07:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-09-22 07:51:45 -07:00
lib sparc64: Fix section attribute warnings. 2009-05-29 16:12:02 -07:00
math-emu sparc64: unify math-emu 2008-12-04 09:16:56 -08:00
mm arches: drop superfluous casts in nr_free_pages() callers 2009-09-22 07:17:34 -07:00
oprofile sparc64: Kill unnecessary cast in profile_timer_exceptions_notify(). 2009-09-08 23:20:39 -07:00
prom sparc64: Fix bootup with mcount in some configs. 2009-09-04 03:39:45 -07:00
Kconfig perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
Kconfig.debug generic debug pagealloc: build fix 2009-04-02 19:04:48 -07:00
Makefile sparc64: build compressed image (zImage) by default 2009-08-16 18:21:47 -07:00