Patchwork [qom-cpu,1/2] target-i386/cpu.c: Coding style fixes

login
register
mail settings
Submitter Eduardo Habkost
Date Jan. 11, 2013, 2:18 a.m.
Message ID <1357870690-12680-2-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/211192/
State New
Headers show

Comments

Eduardo Habkost - Jan. 11, 2013, 2:18 a.m.
* Add braces to 'if' statements;
 * Remove last TAB character from the source.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target-i386/cpu.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Igor Mammedov - Jan. 16, 2013, 7:34 a.m.
On Fri, 11 Jan 2013 00:18:09 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

>  * Add braces to 'if' statements;
>  * Remove last TAB character from the source.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-By: Igor Mammedov <imammedo@redhat.com>

> ---
>  target-i386/cpu.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 9a48e3f..0b44dea 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1917,12 +1917,13 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
>          if (env->cpuid_ext2_features & CPUID_EXT2_LM) {
>              /* 64 bit processor */
>  /* XXX: The physical address space is limited to 42 bits in exec.c. */
> -            *eax = 0x00003028;	/* 48 bits virtual, 40 bits physical */
> +            *eax = 0x00003028;  /* 48 bits virtual, 40 bits physical */
>          } else {
> -            if (env->cpuid_features & CPUID_PSE36)
> +            if (env->cpuid_features & CPUID_PSE36) {
>                  *eax = 0x00000024; /* 36 bits physical */
> -            else
> +            } else {
>                  *eax = 0x00000020; /* 32 bits physical */
> +            }
>          }
>          *ebx = 0;
>          *ecx = 0;
> -- 
> 1.7.11.7
>

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 9a48e3f..0b44dea 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1917,12 +1917,13 @@  void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
         if (env->cpuid_ext2_features & CPUID_EXT2_LM) {
             /* 64 bit processor */
 /* XXX: The physical address space is limited to 42 bits in exec.c. */
-            *eax = 0x00003028;	/* 48 bits virtual, 40 bits physical */
+            *eax = 0x00003028;  /* 48 bits virtual, 40 bits physical */
         } else {
-            if (env->cpuid_features & CPUID_PSE36)
+            if (env->cpuid_features & CPUID_PSE36) {
                 *eax = 0x00000024; /* 36 bits physical */
-            else
+            } else {
                 *eax = 0x00000020; /* 32 bits physical */
+            }
         }
         *ebx = 0;
         *ecx = 0;