From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRJia-0005BL-Am for qemu-devel@nongnu.org; Tue, 31 May 2011 03:50:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRJiY-0008S4-6w for qemu-devel@nongnu.org; Tue, 31 May 2011 03:50:24 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:44393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRJiX-0008Rh-OT for qemu-devel@nongnu.org; Tue, 31 May 2011 03:50:22 -0400 Message-ID: <4DE49DB7.30600@web.de> Date: Tue, 31 May 2011 09:50:15 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4DE120BE.1010602@web.de> <4DE37551.6060502@siemens.com> <4DE48689.7070606@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0220D6D4B7B98CCD790A74B4" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: BrillyWu Cc: kvm@vger.kernel.org, KaryJin@viatech.com.cn, mst@redhat.com, mtosatti@redhat.com, BrillyWu@viatech.com.cn, qemu-devel@nongnu.org, Blue Swirl , avi@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0220D6D4B7B98CCD790A74B4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-05-31 09:39, BrillyWu wrote: > Hi, Jan >=20 >>> I am sure I have checked it with the scripts/checkpatch.pl, and it >>> shows no error or warning. Maybe I should check whether my windows >>> editor and mail client can work well before sending it to >> you. I 'm >>> sorry. >> >> Sorry, you are right. Your patch revealed a bug in the checkpatch >> script. >> >> Blue, this does not trigger the missing braces warning: >=20 > Do you mean the bug is that it can not trigger missing braces warining?= The script fails to detect missing braces as marked below. > It seems that there is no missing braces in my patch, but some > unnecessary braces. There are no unnecessary braces according to QEMU coding style. >=20 >> >> @@ -1035,8 +1052,17 @@ void cpu_x86_cpuid(CPUX86State *env, uin { >> /* test if maximum index reached */ >> if (index & 0x80000000) { >> - if (index > env->cpuid_xlevel) >> - index =3D env->cpuid_level; >> + if (index > env->cpuid_xlevel) { >> + if (env->cpuid_xlevel2 > 0) { >> + /* Handle the Centaur's CPUID instruction. */ >> + if (index > env->cpuid_xlevel2) { >> + index =3D env->cpuid_xlevel2; >> + } else if (index < 0xC0000000) { >> + index =3D env->cpuid_xlevel; >> + } >> + } else >> + index =3D env->cpuid_xlevel; This should be: } else { index =3D ... } >> + } >> } else { >> if (index > env->cpuid_level) >> index =3D env->cpuid_level; >> >> >>> OK, I will use the previous commit log, and send it to you >> in the new thread. >> >> Thanks. I think it would be fair to fix up the braces on commit now. >=20 > It looks that there are some unnecessary braces, but if I remove them, > the script/checkpatch.pl will report warnings. Could I ignore it? Nope, see above. > BTW, I have submited a patch v3 a few minutes before withou fixing up > the braces, and I have tested it with my mail client this time, so it > could be OK now. Yes, your mail client works fine as far as I can see. Jan --------------enig0220D6D4B7B98CCD790A74B4 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk3knboACgkQitSsb3rl5xTkxACg0CC7Ef80hbHrLoZA8fxrkoZt LQkAoIKLRQjfVBZ1ANwdnKZcbT7Rttrm =/ha/ -----END PGP SIGNATURE----- --------------enig0220D6D4B7B98CCD790A74B4--