Skip to contentSkip to conversation

linux-next: build warning after merge of the kvm tree

PATCH Applied Stephen Rothwell 3 participants 3 messages Jul 26, 2010 – Jul 27, 2010

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

Hi all,

After merging the kvm tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

arch/x86/kvm/mmu.c: In function 'kvm_mmu_pte_write':
arch/x86/kvm/mmu.c:2908: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'

Introduced by commit af8720393c71a8f81ade71c404798d80c68c5d73 ("KVM: MMU:
add missing reserved bits check in speculative path").

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#1 lore raw

PATCH 1/1 KVM: fix compile warning

Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the kvm tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

arch/x86/kvm/mmu.c: In function 'kvm_mmu_pte_write':
arch/x86/kvm/mmu.c:2908: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'

Introduced by commit af8720393c71a8f81ade71c404798d80c68c5d73 ("KVM: MMU:
add missing reserved bits check in speculative path").

Hi Stephen,

Thanks for your report, this patch can fix it.

Subject: [PATCH] KVM: fix compile warning

Fix:
arch/x86/kvm/mmu.c: In function 'kvm_mmu_pte_write':
arch/x86/kvm/mmu.c:2908: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'

---
 arch/x86/kvm/mmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/mmu.c +2 -2
index 1a8f43f..0dcc95e 100644
@@ -2904,8 +2904,8 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
 			entry = *spte;
 			mmu_pte_write_zap_pte(vcpu, sp, spte);
 			if (gentry &&
-			      !(sp->role.word ^ vcpu->arch.mmu.base_role.word)
-			      & mask.word)
+			      !((sp->role.word ^ vcpu->arch.mmu.base_role.word)
+			      & mask.word))
 				mmu_pte_write_new_pte(vcpu, sp, spte, &gentry);
 			if (!remote_flush && need_remote_flush(entry, *spte))
 				remote_flush = true;
Signature · 1 line
1.6.5.2
#2 lore raw

Re: [PATCH] KVM: fix compile warning

Quoted 23 lines · Xiao Guangrong
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the kvm tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

arch/x86/kvm/mmu.c: In function 'kvm_mmu_pte_write':
arch/x86/kvm/mmu.c:2908: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'

Introduced by commit af8720393c71a8f81ade71c404798d80c68c5d73 ("KVM: MMU:
add missing reserved bits check in speculative path").

Hi Stephen,

Thanks for your report, this patch can fix it.

Subject: [PATCH] KVM: fix compile warning

Fix:
arch/x86/kvm/mmu.c: In function 'kvm_mmu_pte_write':
arch/x86/kvm/mmu.c:2908: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'

Quoted 5 lines
---
 arch/x86/kvm/mmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.