All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurentiu Tudor <b10716@freescale.com>
To: kvm-ppc@vger.kernel.org, Alexander Graf <agraf@suse.de>
Cc: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>,
	Scott Wood <scottwood@freescale.com>,
	kvm@vger.kernel.org,
	Caraman Mihai Claudiu-B02008 <mihai.caraman@freescale.com>
Subject: [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator
Date: Fri, 22 May 2015 14:46:25 +0000	[thread overview]
Message-ID: <555F4141.8090107@freescale.com> (raw)

This was signaled by a static code analysis tool.

Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
---
 arch/powerpc/kvm/e500_mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c
index 50860e9..29911a0 100644
--- a/arch/powerpc/kvm/e500_mmu.c
+++ b/arch/powerpc/kvm/e500_mmu.c
@@ -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 &
-- 
1.8.3.1

WARNING: multiple messages have this Message-ID (diff)
From: Laurentiu Tudor <b10716@freescale.com>
To: <kvm-ppc@vger.kernel.org>, Alexander Graf <agraf@suse.de>
Cc: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>,
	Scott Wood <scottwood@freescale.com>, <kvm@vger.kernel.org>,
	"Caraman Mihai Claudiu-B02008" <mihai.caraman@freescale.com>
Subject: [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator
Date: Fri, 22 May 2015 17:46:25 +0300	[thread overview]
Message-ID: <555F4141.8090107@freescale.com> (raw)

This was signaled by a static code analysis tool.

Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
---
 arch/powerpc/kvm/e500_mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c
index 50860e9..29911a0 100644
--- a/arch/powerpc/kvm/e500_mmu.c
+++ b/arch/powerpc/kvm/e500_mmu.c
@@ -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 &
-- 
1.8.3.1

             reply	other threads:[~2015-05-22 14:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 14:46 Laurentiu Tudor [this message]
2015-05-22 14:46 ` [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator Laurentiu Tudor
2015-05-22 19:20 ` Scott Wood
2015-05-22 19:20   ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555F4141.8090107@freescale.com \
    --to=b10716@freescale.com \
    --cc=Laurentiu.Tudor@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mihai.caraman@freescale.com \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.