qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Don Slutz" <Don@CloudSwitch.Com>,
	qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 1/6] target-i386/cpu.c: coding style fixes
Date: Tue, 4 Dec 2012 20:40:37 +0100	[thread overview]
Message-ID: <20121204204037.4f04365a@thinkpad.mammed.net> (raw)
In-Reply-To: <1354649683-9078-2-git-send-email-ehabkost@redhat.com>

On Tue,  4 Dec 2012 17:34:38 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> - Use spaces instead of tabs on cpu_x86_cpuid().
> - Use braces on 'if' statement cpu_x86_find_by_name().
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  target-i386/cpu.c | 28 +++++++++++++++-------------
>  1 file changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index c6c2ca0..7afe839 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1227,9 +1227,11 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
>      uint32_t minus_7_0_ebx_features = 0;
>      uint32_t numvalue;
>  
> -    for (def = x86_defs; def; def = def->next)
> -        if (name && !strcmp(name, def->name))
> +    for (def = x86_defs; def; def = def->next) {
> +        if (name && !strcmp(name, def->name)) {
>              break;
> +        }
> +    }
>      if (kvm_enabled() && name && strcmp(name, "host") == 0) {
>          kvm_cpu_fill_host(x86_cpu_def);
>      } else if (!def) {
> @@ -1835,17 +1837,17 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
>          }
>          break;
>      case 0x8000000A:
> -	if (env->cpuid_ext3_features & CPUID_EXT3_SVM) {
> -		*eax = 0x00000001; /* SVM Revision */
> -		*ebx = 0x00000010; /* nr of ASIDs */
> -		*ecx = 0;
> -		*edx = env->cpuid_svm_features; /* optional features */
> -	} else {
> -		*eax = 0;
> -		*ebx = 0;
> -		*ecx = 0;
> -		*edx = 0;
> -	}
> +        if (env->cpuid_ext3_features & CPUID_EXT3_SVM) {
> +            *eax = 0x00000001; /* SVM Revision */
> +            *ebx = 0x00000010; /* nr of ASIDs */
> +            *ecx = 0;
> +            *edx = env->cpuid_svm_features; /* optional features */
> +        } else {
> +            *eax = 0;
> +            *ebx = 0;
> +            *ecx = 0;
> +            *edx = 0;
> +        }
>          break;
>      case 0xC0000000:
>          *eax = env->cpuid_xlevel2;
> -- 
> 1.7.11.7
> 
Reviewed-by: Igor Mammedov <imammedo@redhat.com>

-- 
Regards,
  Igor

  reply	other threads:[~2012-12-04 19:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 19:34 [Qemu-devel] [PATCH 0/6] short x86 CPU init cleanup (v3) Eduardo Habkost
2012-12-04 19:34 ` [Qemu-devel] [PATCH 1/6] target-i386/cpu.c: coding style fixes Eduardo Habkost
2012-12-04 19:40   ` Igor Mammedov [this message]
2012-12-04 19:34 ` [Qemu-devel] [PATCH 2/6] target-i386: cpu: separate feature string parsing from CPU model lookup Eduardo Habkost
2012-12-04 19:47   ` Igor Mammedov
2012-12-05 15:58   ` Andreas Färber
2012-12-04 19:34 ` [Qemu-devel] [PATCH 3/6] target-i386: use define for cpuid vendor string size Eduardo Habkost
2012-12-04 19:38   ` Eduardo Habkost
2012-12-05 11:29     ` Andreas Färber
2012-12-05 11:51       ` Eduardo Habkost
2012-12-05 12:03         ` Igor Mammedov
2012-12-04 19:34 ` [Qemu-devel] [PATCH 4/6] target-i386: postpone cpuid_level update to realize time Eduardo Habkost
2012-12-04 19:36   ` Eduardo Habkost
2012-12-04 19:34 ` [Qemu-devel] [PATCH 5/6] add visitor for parsing hz[KMG] input string Eduardo Habkost
2012-12-04 19:41   ` Eduardo Habkost
2012-12-04 23:43   ` Andreas Färber
2012-12-05 17:52   ` mdroth
2012-12-05 19:21     ` Eduardo Habkost
2012-12-05 21:00       ` mdroth
2012-12-06 20:49         ` Igor Mammedov
2012-12-04 19:34 ` [Qemu-devel] [PATCH 6/6] target-i386: use visit_type_hz to parse tsc_freq property value Eduardo Habkost
2012-12-04 19:55   ` Eduardo Habkost
2012-12-05 16:24 ` [Qemu-devel] [PATCH 0/6] short x86 CPU init cleanup (v3) Andreas Färber
  -- strict thread matches above, loose matches on Subject: below --
2012-12-04 18:58 [Qemu-devel] [PATCH 0/6] short x86 CPU init cleanup (v2) Eduardo Habkost
2012-12-04 18:58 ` [Qemu-devel] [PATCH 1/6] target-i386/cpu.c: coding style fixes Eduardo Habkost

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=20121204204037.4f04365a@thinkpad.mammed.net \
    --to=imammedo@redhat.com \
    --cc=Don@CloudSwitch.Com \
    --cc=afaerber@suse.de \
    --cc=ehabkost@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).