public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant
@ 2008-06-14 18:44 Paolo Ciarrocchi
  2008-06-18 13:01 ` Ingo Molnar
  2008-06-18 13:09 ` Dmitri Vorobiev
  0 siblings, 2 replies; 7+ messages in thread
From: Paolo Ciarrocchi @ 2008-06-14 18:44 UTC (permalink / raw)
  To: Ingo Molnar, tglx, hpa; +Cc: Linux Kernel

Before:
total: 6 errors, 1 warnings, 117 lines checked

After:
total: 0 errors, 1 warnings, 117 lines checked

paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/reg_constant.o.*
780388a3056d58fb759efaf190d5d3d1  /tmp/reg_constant.o.after
780388a3056d58fb759efaf190d5d3d1  /tmp/reg_constant.o.before

paolo@paolo-desktop:~/linux.trees.git$ size /tmp/reg_constant.o.*
   text    data     bss     dec     hex filename
    457       0       0     457     1c9 /tmp/reg_constant.o.after
    457       0       0     457     1c9 /tmp/reg_constant.o.before


Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
---
 arch/x86/math-emu/reg_constant.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/math-emu/reg_constant.c b/arch/x86/math-emu/reg_constant.c
index 04869e6..0054835 100644
--- a/arch/x86/math-emu/reg_constant.c
+++ b/arch/x86/math-emu/reg_constant.c
@@ -16,8 +16,8 @@
 #include "reg_constant.h"
 #include "control_w.h"
 
-#define MAKE_REG(s,e,l,h) { l, h, \
-                            ((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) }
+#define MAKE_REG(s, e, l, h) { l, h, \
+		((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) }
 
 FPU_REG const CONST_1 = MAKE_REG(POS, 0, 0x00000000, 0x80000000);
 #if 0
@@ -40,7 +40,7 @@ FPU_REG const CONST_PI2extra = MAKE_REG(NEG, -66,
 FPU_REG const CONST_Z = MAKE_REG(POS, EXP_UNDER, 0x0, 0x0);
 
 /* Only the sign and significand (and tag) are used in internal NaNs */
-/* The 80486 never generates one of these 
+/* The 80486 never generates one of these
 FPU_REG const CONST_SNAN = MAKE_REG(POS, EXP_OVER, 0x00000001, 0x80000000);
  */
 /* This is the real indefinite QNaN */
@@ -49,7 +49,7 @@ FPU_REG const CONST_QNaN = MAKE_REG(NEG, EXP_OVER, 0x00000000, 0xC0000000);
 /* Only the sign (and tag) is used in internal infinities */
 FPU_REG const CONST_INF = MAKE_REG(POS, EXP_OVER, 0x00000000, 0x80000000);
 
-static void fld_const(FPU_REG const *c, int adj, u_char tag)
+static void fld_const(FPU_REG const * c, int adj, u_char tag)
 {
 	FPU_REG *st_new_ptr;
 
-- 
1.5.6.rc1.21.g03300


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant
  2008-06-14 18:44 [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant Paolo Ciarrocchi
@ 2008-06-18 13:01 ` Ingo Molnar
  2008-06-18 13:09 ` Dmitri Vorobiev
  1 sibling, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2008-06-18 13:01 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: tglx, hpa, Linux Kernel


* Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote:

> Before:
> total: 6 errors, 1 warnings, 117 lines checked
> 
> After:
> total: 0 errors, 1 warnings, 117 lines checked

applied to tip/x86/cleanups, thanks.

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant
  2008-06-14 18:44 [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant Paolo Ciarrocchi
  2008-06-18 13:01 ` Ingo Molnar
@ 2008-06-18 13:09 ` Dmitri Vorobiev
  2008-06-18 14:19   ` Paolo Ciarrocchi
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitri Vorobiev @ 2008-06-18 13:09 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: Ingo Molnar, tglx, hpa, Linux Kernel

Paolo Ciarrocchi wrote:
>  
> -static void fld_const(FPU_REG const *c, int adj, u_char tag)
> +static void fld_const(FPU_REG const * c, int adj, u_char tag)
________________________________________^

The above does not seem to me like a big improvement in code quality. A
false positive from checkpatch.pl?

Dmitri

>  {
>  	FPU_REG *st_new_ptr;
>  


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant
  2008-06-18 13:09 ` Dmitri Vorobiev
@ 2008-06-18 14:19   ` Paolo Ciarrocchi
  2008-06-18 14:56     ` Stefan Richter
  2008-06-19  9:07     ` Andy Whitcroft
  0 siblings, 2 replies; 7+ messages in thread
From: Paolo Ciarrocchi @ 2008-06-18 14:19 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: Ingo Molnar, tglx, hpa, Linux Kernel, Andy Whitcroft

On Wed, Jun 18, 2008 at 3:09 PM, Dmitri Vorobiev
<dmitri.vorobiev@movial.fi> wrote:
> Paolo Ciarrocchi wrote:
>>
>> -static void fld_const(FPU_REG const *c, int adj, u_char tag)
>> +static void fld_const(FPU_REG const * c, int adj, u_char tag)
> ________________________________________^
>
> The above does not seem to me like a big improvement in code quality. A
> false positive from checkpatch.pl?

Yes, I think you are right.
Andy CC'ed so that he can have a look at that.

Thanks.

regards,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant
  2008-06-18 14:19   ` Paolo Ciarrocchi
@ 2008-06-18 14:56     ` Stefan Richter
  2008-06-19  9:07     ` Andy Whitcroft
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Richter @ 2008-06-18 14:56 UTC (permalink / raw)
  To: Paolo Ciarrocchi
  Cc: Dmitri Vorobiev, Ingo Molnar, tglx, hpa, Linux Kernel,
	Andy Whitcroft

> On Wed, Jun 18, 2008 at 3:09 PM, Dmitri Vorobiev
> <dmitri.vorobiev@movial.fi> wrote:
>> Paolo Ciarrocchi wrote:
>>>
>>> -static void fld_const(FPU_REG const *c, int adj, u_char tag)
>>> +static void fld_const(FPU_REG const * c, int adj, u_char tag)
>> ________________________________________^
>>
>> The above does not seem to me like a big improvement in code quality. A
>> false positive from checkpatch.pl?

It should obviously be

 static void fld_const(const FPU_REG *c, int adj, u_char tag)

FPU_REG is not an appropriate type name though.  Is "typedef struct
fpu__reg FPU_REG;" necessary at all?  (Removing it would create some
code churn all over x86/math-emu/ though. Maybe not desirable.)
-- 
Stefan Richter
-=====-==--- -==- =--=-
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant
  2008-06-18 14:19   ` Paolo Ciarrocchi
  2008-06-18 14:56     ` Stefan Richter
@ 2008-06-19  9:07     ` Andy Whitcroft
  2008-06-19  9:19       ` Dmitri Vorobiev
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Whitcroft @ 2008-06-19  9:07 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: Dmitri Vorobiev, Ingo Molnar, tglx, hpa, Linux Kernel

On Wed, Jun 18, 2008 at 04:19:38PM +0200, Paolo Ciarrocchi wrote:
> On Wed, Jun 18, 2008 at 3:09 PM, Dmitri Vorobiev
> <dmitri.vorobiev@movial.fi> wrote:
> > Paolo Ciarrocchi wrote:
> >>
> >> -static void fld_const(FPU_REG const *c, int adj, u_char tag)
> >> +static void fld_const(FPU_REG const * c, int adj, u_char tag)
> > ________________________________________^
> >
> > The above does not seem to me like a big improvement in code quality. A
> > false positive from checkpatch.pl?
> 
> Yes, I think you are right.
> Andy CC'ed so that he can have a look at that.

That would be a false positive if we are recommending that.  I have
pushed this fragment in isolation through all versions back to 0.15 and
none of them recommend it.

Ahh, but if I push the whole patch through 0.19 spits it out.  Ok this
is a subtle bug in modifier procesing and is fixed in the head of my
tree.  Will be fixed in the next batch which goes up to -mm.

-apw

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant
  2008-06-19  9:07     ` Andy Whitcroft
@ 2008-06-19  9:19       ` Dmitri Vorobiev
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitri Vorobiev @ 2008-06-19  9:19 UTC (permalink / raw)
  To: Paolo Ciarrocchi, Ingo Molnar; +Cc: Andy Whitcroft, tglx, hpa, Linux Kernel

Andy Whitcroft wrote:
> On Wed, Jun 18, 2008 at 04:19:38PM +0200, Paolo Ciarrocchi wrote:
>> On Wed, Jun 18, 2008 at 3:09 PM, Dmitri Vorobiev
>> <dmitri.vorobiev@movial.fi> wrote:
>>> Paolo Ciarrocchi wrote:
>>>> -static void fld_const(FPU_REG const *c, int adj, u_char tag)
>>>> +static void fld_const(FPU_REG const * c, int adj, u_char tag)
>>> ________________________________________^
>>>
>>> The above does not seem to me like a big improvement in code quality. A
>>> false positive from checkpatch.pl?
>> Yes, I think you are right.
>> Andy CC'ed so that he can have a look at that.
> 
> That would be a false positive if we are recommending that.  I have
> pushed this fragment in isolation through all versions back to 0.15 and
> none of them recommend it.
> 
> Ahh, but if I push the whole patch through 0.19 spits it out.  Ok this
> is a subtle bug in modifier procesing and is fixed in the head of my
> tree.  Will be fixed in the next batch which goes up to -mm.

Maybe it makes sense for Ingo to revert the original Paolo's patch now?

Dmitri


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-06-19  9:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-14 18:44 [PATCH] x86: coding style fixes to arch/x86/math-emu/reg_constant Paolo Ciarrocchi
2008-06-18 13:01 ` Ingo Molnar
2008-06-18 13:09 ` Dmitri Vorobiev
2008-06-18 14:19   ` Paolo Ciarrocchi
2008-06-18 14:56     ` Stefan Richter
2008-06-19  9:07     ` Andy Whitcroft
2008-06-19  9:19       ` Dmitri Vorobiev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox