Patchwork [1/3] target-i386/cpu.c: coding style fix

login
register
mail settings
Submitter Eduardo Habkost
Date Dec. 18, 2012, 4:29 p.m.
Message ID <1355848163-29846-2-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/207151/
State New
Headers show

Comments

Eduardo Habkost - Dec. 18, 2012, 4:29 p.m.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target-i386/cpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Igor Mammedov - Dec. 18, 2012, 4:44 p.m.
On Tue, 18 Dec 2012 14:29:21 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  target-i386/cpu.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 2d4fc42..fe27def 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1789,10 +1789,11 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t
> index, uint32_t count, /* XXX: The physical address space is limited to 42
> bits in exec.c. */ *eax = 0x00003028;	/* 48 bits virtual, 40 bits
                                       ^^ you forgot TAB here 
> 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;
Eduardo Habkost - Dec. 18, 2012, 5:03 p.m.
On Tue, Dec 18, 2012 at 05:44:12PM +0100, Igor Mammedov wrote:
> On Tue, 18 Dec 2012 14:29:21 -0200
> Eduardo Habkost <ehabkost@redhat.com> wrote:
> 
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> >  target-i386/cpu.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> > index 2d4fc42..fe27def 100644
> > --- a/target-i386/cpu.c
> > +++ b/target-i386/cpu.c
> > @@ -1789,10 +1789,11 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t
> > index, uint32_t count, /* XXX: The physical address space is limited to 42
> > bits in exec.c. */ *eax = 0x00003028;	/* 48 bits virtual, 40 bits
>                                        ^^ you forgot TAB here 

See patch 2/3.  :-)
Andreas Färber - Dec. 18, 2012, 6:33 p.m.
Am 18.12.2012 18:03, schrieb Eduardo Habkost:
> On Tue, Dec 18, 2012 at 05:44:12PM +0100, Igor Mammedov wrote:
>> On Tue, 18 Dec 2012 14:29:21 -0200
>> Eduardo Habkost <ehabkost@redhat.com> wrote:
>>
>>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>>> ---
>>>  target-i386/cpu.c | 5 +++--
>>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
>>> index 2d4fc42..fe27def 100644
>>> --- a/target-i386/cpu.c
>>> +++ b/target-i386/cpu.c
>>> @@ -1789,10 +1789,11 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t
>>> index, uint32_t count, /* XXX: The physical address space is limited to 42
>>> bits in exec.c. */ *eax = 0x00003028;	/* 48 bits virtual, 40 bits
>>                                        ^^ you forgot TAB here 
> 
> See patch 2/3.  :-)

Can I just squash that into this one?

Andreas
Eduardo Habkost - Dec. 18, 2012, 6:41 p.m.
On Tue, Dec 18, 2012 at 07:33:13PM +0100, Andreas Färber wrote:
> Am 18.12.2012 18:03, schrieb Eduardo Habkost:
> > On Tue, Dec 18, 2012 at 05:44:12PM +0100, Igor Mammedov wrote:
> >> On Tue, 18 Dec 2012 14:29:21 -0200
> >> Eduardo Habkost <ehabkost@redhat.com> wrote:
> >>
> >>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> >>> ---
> >>>  target-i386/cpu.c | 5 +++--
> >>>  1 file changed, 3 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> >>> index 2d4fc42..fe27def 100644
> >>> --- a/target-i386/cpu.c
> >>> +++ b/target-i386/cpu.c
> >>> @@ -1789,10 +1789,11 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t
> >>> index, uint32_t count, /* XXX: The physical address space is limited to 42
> >>> bits in exec.c. */ *eax = 0x00003028;	/* 48 bits virtual, 40 bits
> >>                                        ^^ you forgot TAB here 
> > 
> > See patch 2/3.  :-)
> 
> Can I just squash that into this one?

Yes, sure.

I was keeping both changes separate on my git tree while
working/rebasing the series, but I should have squashed them before
submitting (as both are just "coding style fixes").

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 2d4fc42..fe27def 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1789,10 +1789,11 @@  void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
 /* XXX: The physical address space is limited to 42 bits in exec.c. */
             *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;