KVM: PPC: fix suspicious use of conditional operator
authorTudor Laurentiu <b10716@freescale.com>
Mon, 25 May 2015 08:48:39 +0000 (11:48 +0300)
committerAlexander Graf <agraf@suse.de>
Sat, 22 Aug 2015 09:16:16 +0000 (11:16 +0200)
This was signaled by a static code analysis tool.

Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
Reviewed-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/e500_mmu.c

index 50860e919cb81777a0ef4015e48f9bfda2b3e810..29911a07bcdb071d1f94db55ca8e7ce4e2b9e5d3 100644 (file)
@@ -377,7 +377,7 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, gva_t ea)
                        | MAS0_NV(vcpu_e500->gtlb_nv[tlbsel]);
                vcpu->arch.shared->mas1 =
                          (vcpu->arch.shared->mas6 & MAS6_SPID0)
-                       | (vcpu->arch.shared->mas6 & (MAS6_SAS ? MAS1_TS : 0))
+                       | ((vcpu->arch.shared->mas6 & MAS6_SAS) ? MAS1_TS : 0)
                        | (vcpu->arch.shared->mas4 & MAS4_TSIZED(~0));
                vcpu->arch.shared->mas2 &= MAS2_EPN;
                vcpu->arch.shared->mas2 |= vcpu->arch.shared->mas4 &