linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the kvm tree
@ 2010-07-26  5:14 Stephen Rothwell
  2010-07-26  5:47 ` [PATCH] KVM: fix compile warning Xiao Guangrong
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2010-07-26  5:14 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: linux-next, linux-kernel, Xiao Guangrong

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

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").
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* [PATCH] KVM: fix compile warning
  2010-07-26  5:14 linux-next: build warning after merge of the kvm tree Stephen Rothwell
@ 2010-07-26  5:47 ` Xiao Guangrong
  2010-07-27 21:40   ` Marcelo Tosatti
  0 siblings, 1 reply; 3+ messages in thread
From: Xiao Guangrong @ 2010-07-26  5:47 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Avi Kivity, Marcelo Tosatti, linux-next, linux-kernel, KVM list


Stephen Rothwell wrote:
> 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 '~'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
 arch/x86/kvm/mmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 1a8f43f..0dcc95e 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -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;
-- 
1.6.5.2

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

* Re: [PATCH] KVM: fix compile warning
  2010-07-26  5:47 ` [PATCH] KVM: fix compile warning Xiao Guangrong
@ 2010-07-27 21:40   ` Marcelo Tosatti
  0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2010-07-27 21:40 UTC (permalink / raw)
  To: Xiao Guangrong
  Cc: Stephen Rothwell, Avi Kivity, linux-next, linux-kernel, KVM list

On Mon, Jul 26, 2010 at 01:47:23PM +0800, Xiao Guangrong wrote:
> 
> Stephen Rothwell wrote:
> > 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 '~'
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> ---
>  arch/x86/kvm/mmu.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

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

end of thread, other threads:[~2010-07-27 21:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26  5:14 linux-next: build warning after merge of the kvm tree Stephen Rothwell
2010-07-26  5:47 ` [PATCH] KVM: fix compile warning Xiao Guangrong
2010-07-27 21:40   ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).