qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: BrillyWu <brillywu@gmail.com>
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 <blauwirbel@gmail.com>,
	avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU
Date: Tue, 31 May 2011 09:50:15 +0200	[thread overview]
Message-ID: <4DE49DB7.30600@web.de> (raw)
In-Reply-To: <BANLkTinGu5kaF=HmnRJRnsesEgTQC01_Zw@mail.gmail.com>

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

On 2011-05-31 09:39, BrillyWu wrote:
> Hi, Jan
> 
>>> 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:
> 
> 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.

> 
>>
>> @@ -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 = 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 = env->cpuid_xlevel2;
>> +                } else if (index < 0xC0000000) {
>> +                    index = env->cpuid_xlevel;
>> +                }
>> +            } else
>> +                index =  env->cpuid_xlevel;

This should be:

    } else {
        index = ...
    }

>> +        }
>>      } else {
>>          if (index > env->cpuid_level)
>>              index = 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.
> 
> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2011-05-31  7:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10  8:02 [Qemu-devel] [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU BrillyWu
2011-05-11 11:50 ` Avi Kivity
2011-05-28 10:28 ` Jan Kiszka
2011-05-28 16:20 ` Jan Kiszka
2011-05-30  4:02   ` BrillyWu
2011-05-30  7:40     ` BrillyWu
2011-05-30  7:47       ` Jan Kiszka
2011-05-30  8:59       ` BrillyWu
2011-05-30 10:45         ` Jan Kiszka
2011-05-31  1:25           ` BrillyWu
2011-05-31  6:11             ` Jan Kiszka
2011-05-31  7:39               ` BrillyWu
2011-05-31  7:50                 ` Jan Kiszka [this message]
2011-05-31  8:22                   ` BrillyWu

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=4DE49DB7.30600@web.de \
    --to=jan.kiszka@web.de \
    --cc=BrillyWu@viatech.com.cn \
    --cc=KaryJin@viatech.com.cn \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=brillywu@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).