Skip to contentSkip to conversation

kvmppc: Fix BUILD_BUG_ON condition

PATCH Applied Hollis Blanchard 2 participants 2 messages Oct 23, 2009 – Oct 25, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvmppc: 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...

arch/powerpc/kvm/timing.h +1 -1
@@ -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++;
Applied
#1 lore raw
Quoted 4 lines · Hollis Blanchard

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...

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function