From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: mmu: Remove unused local variable Date: Thu, 03 Jun 2010 10:34:49 +0200 Message-ID: <4C076929.7070601@web.de> References: <4C0754DD.3030305@web.de> <4C07586B.4070709@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig10FD27FD5B12A84E818BEBFA" Cc: Avi Kivity , Marcelo Tosatti , kvm , Huang Ying To: Xiao Guangrong Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:47225 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758361Ab0FCIe6 (ORCPT ); Thu, 3 Jun 2010 04:34:58 -0400 In-Reply-To: <4C07586B.4070709@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig10FD27FD5B12A84E818BEBFA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xiao Guangrong wrote: >=20 > Jan Kiszka wrote: >> From: Jan Kiszka >> >> Signed-off-by: Jan Kiszka >> --- >> >> No one else checks for new build warnings? >> >> arch/x86/kvm/mmu.c | 1 - >> 1 files changed, 0 insertions(+), 1 deletions(-) >> >> 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 >=20 > Actually, the compiler still complain: >=20 > 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 Indeed. I only looked at the log from older kernels. >=20 > Maybe we can fix it like this: >=20 >=20 > --- > arch/x86/kvm/mmu.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 > 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) Probably this was the original plan (CC'ing the author). Jan --------------enig10FD27FD5B12A84E818BEBFA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkwHaS8ACgkQitSsb3rl5xRaFwCfQtJuPLGFyl8Ul5hYu2oUpYgJ B7MAoMna04Pltc9UtwlVg6LUlftuVyxO =zQ5u -----END PGP SIGNATURE----- --------------enig10FD27FD5B12A84E818BEBFA--