From: Hollis Blanchard Date: Fri, 23 Oct 2009 00:35:30 +0000 Subject: [PATCH] kvmppc: Fix BUILD_BUG_ON condition Message-Id: <144e990d2290db826b04.1256258130@slab.austin.ibm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org 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 diff --git a/arch/powerpc/kvm/timing.h b/arch/powerpc/kvm/timing.h --- a/arch/powerpc/kvm/timing.h +++ b/arch/powerpc/kvm/timing.h @@ -48,7 +48,7 @@ static inline void kvmppc_set_exit_type( static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type) { /* type has to be known at build time for optimization */ - BUILD_BUG_ON(__builtin_constant_p(type)); + BUILD_BUG_ON(!__builtin_constant_p(type)); switch (type) { case EXT_INTR_EXITS: vcpu->stat.ext_intr_exits++;