Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: powerpc: Fix BUILD_BUG_ON condition

The old BUILD_BUG_ON implementation didn't work with __builtin_constant_p().
Fixing that revealed this test had been inverted for a long time without
anybody noticing...

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

authored by

Hollis Blanchard and committed by
Avi Kivity
c0a187e1 26bb0981

+1 -1
+1 -1
arch/powerpc/kvm/timing.h
··· 51 51 52 52 /* The BUILD_BUG_ON below breaks in funny ways, commented out 53 53 * for now ... -BenH 54 - BUILD_BUG_ON(__builtin_constant_p(type)); 54 + BUILD_BUG_ON(!__builtin_constant_p(type)); 55 55 */ 56 56 switch (type) { 57 57 case EXT_INTR_EXITS: