linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/7] X86: Fix trailing statements should be on next line
@ 2008-01-28 23:07 Paolo Ciarrocchi
  2008-01-28 23:07 ` Willy Tarreau
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Ciarrocchi @ 2008-01-28 23:07 UTC (permalink / raw)
  To: Ingo Molnar, Linux Kernel

Fix trailing statements should be on next line

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

diff --git a/arch/x86/math-emu/errors.c b/arch/x86/math-emu/errors.c
index 7f96db4..4419339 100644
--- a/arch/x86/math-emu/errors.c
+++ b/arch/x86/math-emu/errors.c
@@ -93,19 +93,32 @@ void FPU_printall(void)
   partial_status = status_word();
 
 #ifdef DEBUGGING
-if ( partial_status & SW_Backward )    printk("SW: backward compatibility\n");
-if ( partial_status & SW_C3 )          printk("SW: condition bit 3\n");
-if ( partial_status & SW_C2 )          printk("SW: condition bit 2\n");
-if ( partial_status & SW_C1 )          printk("SW: condition bit 1\n");
-if ( partial_status & SW_C0 )          printk("SW: condition bit 0\n");
-if ( partial_status & SW_Summary )     printk("SW: exception summary\n");
-if ( partial_status & SW_Stack_Fault ) printk("SW: stack fault\n");
-if ( partial_status & SW_Precision )   printk("SW: loss of precision\n");
-if ( partial_status & SW_Underflow )   printk("SW: underflow\n");
-if ( partial_status & SW_Overflow )    printk("SW: overflow\n");
-if ( partial_status & SW_Zero_Div )    printk("SW: divide by zero\n");
-if ( partial_status & SW_Denorm_Op )   printk("SW: denormalized operand\n");
-if ( partial_status & SW_Invalid )     printk("SW: invalid operation\n");
+if ( partial_status & SW_Backward )
+printk("SW: backward compatibility\n");
+if ( partial_status & SW_C3 )
+printk("SW: condition bit 3\n");
+if ( partial_status & SW_C2 )
+printk("SW: condition bit 2\n");
+if ( partial_status & SW_C1 )
+printk("SW: condition bit 1\n");
+if ( partial_status & SW_C0 )
+printk("SW: condition bit 0\n");
+if ( partial_status & SW_Summary )
+printk("SW: exception summary\n");
+if ( partial_status & SW_Stack_Fault )
+printk("SW: stack fault\n");
+if ( partial_status & SW_Precision )
+printk("SW: loss of precision\n");
+if ( partial_status & SW_Underflow )
+printk("SW: underflow\n");
+if ( partial_status & SW_Overflow )
+printk("SW: overflow\n");
+if ( partial_status & SW_Zero_Div )
+printk("SW: divide by zero\n");
+if ( partial_status & SW_Denorm_Op )
+printk("SW: denormalized operand\n");
+if ( partial_status & SW_Invalid )
+printk("SW: invalid operation\n");
 #endif /* DEBUGGING */
 
   printk(" SW: b=%d st=%ld es=%d sf=%d cc=%d%d%d%d ef=%d%d%d%d%d%d\n",
-- 
1.5.4.rc3


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

* Re: [PATCH 3/7] X86: Fix trailing statements should be on next line
  2008-01-28 23:07 [PATCH 3/7] X86: Fix trailing statements should be on next line Paolo Ciarrocchi
@ 2008-01-28 23:07 ` Willy Tarreau
  2008-01-29 12:43   ` Stefan Richter
  2008-02-01 16:21   ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Willy Tarreau @ 2008-01-28 23:07 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: Ingo Molnar, Linux Kernel

Hi Paolo,

On Tue, Jan 29, 2008 at 12:07:44AM +0100, Paolo Ciarrocchi wrote:
> Fix trailing statements should be on next line

> -if ( partial_status & SW_C3 )          printk("SW: condition bit 3\n");
> -if ( partial_status & SW_C2 )          printk("SW: condition bit 2\n");
> -if ( partial_status & SW_C1 )          printk("SW: condition bit 1\n");
> -if ( partial_status & SW_C0 )          printk("SW: condition bit 0\n");
> -if ( partial_status & SW_Summary )     printk("SW: exception summary\n");
> -if ( partial_status & SW_Stack_Fault ) printk("SW: stack fault\n");
> -if ( partial_status & SW_Precision )   printk("SW: loss of precision\n");
> -if ( partial_status & SW_Underflow )   printk("SW: underflow\n");
> -if ( partial_status & SW_Overflow )    printk("SW: overflow\n");
> -if ( partial_status & SW_Zero_Div )    printk("SW: divide by zero\n");
> -if ( partial_status & SW_Denorm_Op )   printk("SW: denormalized operand\n");
> -if ( partial_status & SW_Invalid )     printk("SW: invalid operation\n");

> +if ( partial_status & SW_Backward )
> +printk("SW: backward compatibility\n");
> +if ( partial_status & SW_C3 )
> +printk("SW: condition bit 3\n");
> +if ( partial_status & SW_C2 )
> +printk("SW: condition bit 2\n");
> +if ( partial_status & SW_C1 )
> +printk("SW: condition bit 1\n");
> +if ( partial_status & SW_C0 )
> +printk("SW: condition bit 0\n");
> +if ( partial_status & SW_Summary )
> +printk("SW: exception summary\n");
> +if ( partial_status & SW_Stack_Fault )
> +printk("SW: stack fault\n");
> +if ( partial_status & SW_Precision )
> +printk("SW: loss of precision\n");
> +if ( partial_status & SW_Underflow )
> +printk("SW: underflow\n");
> +if ( partial_status & SW_Overflow )
> +printk("SW: overflow\n");
> +if ( partial_status & SW_Zero_Div )
> +printk("SW: divide by zero\n");
> +if ( partial_status & SW_Denorm_Op )
> +printk("SW: denormalized operand\n");
> +if ( partial_status & SW_Invalid )
> +printk("SW: invalid operation\n");
>  #endif /* DEBUGGING */

Well, IMHO, the code was more readable and checkable in the initial
version. I think this is one example of exceptions where code appearance
is more important than style correctness.

Regards,
Willy


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

* Re: [PATCH 3/7] X86: Fix trailing statements should be on next line
  2008-01-28 23:07 ` Willy Tarreau
@ 2008-01-29 12:43   ` Stefan Richter
  2008-02-01 16:21   ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Richter @ 2008-01-29 12:43 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Paolo Ciarrocchi, Ingo Molnar, Linux Kernel

Willy Tarreau wrote:
> Hi Paolo,
> 
> On Tue, Jan 29, 2008 at 12:07:44AM +0100, Paolo Ciarrocchi wrote:
>> Fix trailing statements should be on next line
> 
>> -if ( partial_status & SW_C3 )          printk("SW: condition bit 3\n");
...
>> +if ( partial_status & SW_Backward )
>> +printk("SW: backward compatibility\n");
...
> 
> Well, IMHO, the code was more readable and checkable in the initial
> version. I think this is one example of exceptions where code appearance
> is more important than style correctness.

Besides, the proposed style "fix" itself violates CodingStyle in at
least two obvious ways.
-- 
Stefan Richter
-=====-==--- ---= ===-=
http://arcgraph.de/sr/

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

* Re: [PATCH 3/7] X86: Fix trailing statements should be on next line
  2008-01-28 23:07 ` Willy Tarreau
  2008-01-29 12:43   ` Stefan Richter
@ 2008-02-01 16:21   ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2008-02-01 16:21 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Paolo Ciarrocchi, Linux Kernel


* Willy Tarreau <w@1wt.eu> wrote:

> Hi Paolo,
> 
> On Tue, Jan 29, 2008 at 12:07:44AM +0100, Paolo Ciarrocchi wrote:
> > Fix trailing statements should be on next line
> 
> > -if ( partial_status & SW_C3 )          printk("SW: condition bit 3\n");
> > -if ( partial_status & SW_C2 )          printk("SW: condition bit 2\n");
> > -if ( partial_status & SW_C1 )          printk("SW: condition bit 1\n");
> > -if ( partial_status & SW_C0 )          printk("SW: condition bit 0\n");
> > -if ( partial_status & SW_Summary )     printk("SW: exception summary\n");
> > -if ( partial_status & SW_Stack_Fault ) printk("SW: stack fault\n");
> > -if ( partial_status & SW_Precision )   printk("SW: loss of precision\n");
> > -if ( partial_status & SW_Underflow )   printk("SW: underflow\n");
> > -if ( partial_status & SW_Overflow )    printk("SW: overflow\n");
> > -if ( partial_status & SW_Zero_Div )    printk("SW: divide by zero\n");
> > -if ( partial_status & SW_Denorm_Op )   printk("SW: denormalized operand\n");
> > -if ( partial_status & SW_Invalid )     printk("SW: invalid operation\n");
> 
> > +if ( partial_status & SW_Backward )
> > +printk("SW: backward compatibility\n");
> > +if ( partial_status & SW_C3 )
> > +printk("SW: condition bit 3\n");
> > +if ( partial_status & SW_C2 )
> > +printk("SW: condition bit 2\n");
> > +if ( partial_status & SW_C1 )
> > +printk("SW: condition bit 1\n");
> > +if ( partial_status & SW_C0 )
> > +printk("SW: condition bit 0\n");
> > +if ( partial_status & SW_Summary )
> > +printk("SW: exception summary\n");
> > +if ( partial_status & SW_Stack_Fault )
> > +printk("SW: stack fault\n");
> > +if ( partial_status & SW_Precision )
> > +printk("SW: loss of precision\n");
> > +if ( partial_status & SW_Underflow )
> > +printk("SW: underflow\n");
> > +if ( partial_status & SW_Overflow )
> > +printk("SW: overflow\n");
> > +if ( partial_status & SW_Zero_Div )
> > +printk("SW: divide by zero\n");
> > +if ( partial_status & SW_Denorm_Op )
> > +printk("SW: denormalized operand\n");
> > +if ( partial_status & SW_Invalid )
> > +printk("SW: invalid operation\n");
> >  #endif /* DEBUGGING */
> 
> Well, IMHO, the code was more readable and checkable in the initial 
> version. I think this is one example of exceptions where code 
> appearance is more important than style correctness.

definitely so. The rule of thumb is: if in doubt, use your human taste. 
Does it 'look' better? If not, dont do the change.

	Ingo

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

end of thread, other threads:[~2008-02-01 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-28 23:07 [PATCH 3/7] X86: Fix trailing statements should be on next line Paolo Ciarrocchi
2008-01-28 23:07 ` Willy Tarreau
2008-01-29 12:43   ` Stefan Richter
2008-02-01 16:21   ` Ingo Molnar

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).