Browse Source

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>
Hollis Blanchard 15 năm trước cách đây
mục cha
commit
c0a187e12d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      arch/powerpc/kvm/timing.h

+ 1 - 1
arch/powerpc/kvm/timing.h

@@ -51,7 +51,7 @@ static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type)
 
 	/* The BUILD_BUG_ON below breaks in funny ways, commented out
 	 * for now ... -BenH
-	BUILD_BUG_ON(__builtin_constant_p(type));
+	BUILD_BUG_ON(!__builtin_constant_p(type));
 	*/
 	switch (type) {
 	case EXT_INTR_EXITS: