From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH] KVM: mmu: Remove unused local variable Date: Thu, 03 Jun 2010 15:23:23 +0800 Message-ID: <4C07586B.4070709@cn.fujitsu.com> References: <4C0754DD.3030305@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Avi Kivity , Marcelo Tosatti , kvm To: Jan Kiszka Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:56576 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752675Ab0FCH0v convert rfc822-to-8bit (ORCPT ); Thu, 3 Jun 2010 03:26:51 -0400 In-Reply-To: <4C0754DD.3030305@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > From: Jan Kiszka >=20 > Signed-off-by: Jan Kiszka > --- >=20 > No one else checks for new build warnings? >=20 > arch/x86/kvm/mmu.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) >=20 > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index c16c4ca..9b9d773 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -2045,7 +2045,6 @@ static void kvm_send_hwpoison_signal(struct kvm= *kvm, gfn_t gfn) > { > char buf[1]; > void __user *hva; > - int r; > =20 Actually, the compiler still complain: arch/x86/kvm/mmu.c: In function =E2=80=98kvm_send_hwpoison_signal=E2=80= =99: arch/x86/kvm/mmu.c:2051: warning: ignoring return value of =E2=80=98cop= y_from_user=E2=80=99, declared with attribute warn_unused_resul Maybe we can fix it like this: --- arch/x86/kvm/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c16c4ca..a62e3ba 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2049,7 +2049,7 @@ static void kvm_send_hwpoison_signal(struct kvm *= kvm, gfn_t gfn) =20 /* Touch the page, so send SIGBUS */ hva =3D (void __user *)gfn_to_hva(kvm, gfn); - (void)copy_from_user(buf, hva, 1); + r =3D copy_from_user(buf, hva, 1); } =20 static int kvm_handle_bad_page(struct kvm *kvm, gfn_t gfn, pfn_t pfn) --=20 1.6.1.2