From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Avi Kivity <avi@qumranet.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
KVM list <kvm@vger.kernel.org>
Subject: [PATCH] KVM: fix compile warning
Date: Mon, 26 Jul 2010 13:47:23 +0800 [thread overview]
Message-ID: <4C4D216B.5040004@cn.fujitsu.com> (raw)
In-Reply-To: <20100726151405.2dfd20ee.sfr@canb.auug.org.au>
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
next prev parent reply other threads:[~2010-07-26 5:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 5:14 linux-next: build warning after merge of the kvm tree Stephen Rothwell
2010-07-26 5:47 ` Xiao Guangrong [this message]
2010-07-27 21:40 ` [PATCH] KVM: fix compile warning Marcelo Tosatti
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=4C4D216B.5040004@cn.fujitsu.com \
--to=xiaoguangrong@cn.fujitsu.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=sfr@canb.auug.org.au \
/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 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).