All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator
@ 2015-05-22 14:46 ` Laurentiu Tudor
  0 siblings, 0 replies; 4+ messages in thread
From: Laurentiu Tudor @ 2015-05-22 14:46 UTC (permalink / raw
  To: kvm-ppc, Alexander Graf
  Cc: Laurentiu Tudor, Scott Wood, kvm, Caraman Mihai Claudiu-B02008

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator
@ 2015-05-22 14:46 ` Laurentiu Tudor
  0 siblings, 0 replies; 4+ messages in thread
From: Laurentiu Tudor @ 2015-05-22 14:46 UTC (permalink / raw
  To: kvm-ppc, Alexander Graf
  Cc: Laurentiu Tudor, Scott Wood, kvm, Caraman Mihai Claudiu-B02008

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator
  2015-05-22 14:46 ` Laurentiu Tudor
@ 2015-05-22 19:20   ` Scott Wood
  -1 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2015-05-22 19:20 UTC (permalink / raw
  To: Laurentiu Tudor
  Cc: kvm-ppc, Alexander Graf, Laurentiu Tudor, kvm,
	Caraman Mihai Claudiu-B02008

On Fri, 2015-05-22 at 17:46 +0300, Laurentiu Tudor wrote:
> 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 &

Reviewed-by: Scott Wood <scottwood@freescale.com>

Please send as non-RFC.

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator
@ 2015-05-22 19:20   ` Scott Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2015-05-22 19:20 UTC (permalink / raw
  To: Laurentiu Tudor
  Cc: kvm-ppc, Alexander Graf, Laurentiu Tudor, kvm,
	Caraman Mihai Claudiu-B02008

On Fri, 2015-05-22 at 17:46 +0300, Laurentiu Tudor wrote:
> 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 &

Reviewed-by: Scott Wood <scottwood@freescale.com>

Please send as non-RFC.

-Scott



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-22 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22 14:46 [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator Laurentiu Tudor
2015-05-22 14:46 ` Laurentiu Tudor
2015-05-22 19:20 ` Scott Wood
2015-05-22 19:20   ` Scott Wood

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.