[Cbe-oss-dev] [PATCH] spufs: fix restore_decr_wrapped()

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Tue Aug 28 17:28:28 EST 2007


On Tue, 28 Aug 2007, Jeremy Kerr wrote:
> > This should be:
> >
> > 	if (csa->spu_chnlcnt_RW[0] == 0 &&
> > 	    (csa->spu_chnldata_RW[1] & 0x20) &&
> > 	    !(csa->spu_chnldata_RW[0] & 0x20))
> > 		csa->spu_chnlcnt_RW[0] = 1;
> 
> Hm, I disagree - the 4-space indent makes it difficult to quickly see 
> where the body of the if statement begins, especially since (in this 
> case) the body looks a lot like the condition.
> 
> And from CodingStyle:
> 
>  Statements longer than 80 columns will be broken into sensible chunks.
>  Descendants are always substantially shorter than the parent and are 
>  placed substantially to the right.
> 
> I think mine is more 'substantially to the right' than yours :D
> 
> However, religious wars over whitespace are best avoided, and if you can 
> convince me that the half-indent is better, I'll do it that way :)

  - It's not a half-indent, the second (and later) parts of the condition
    are aligned to the first part of the condition, which happens to be 4
    spaces because of strlen("if (") == 4,
  - The body is indented by a tab w.r.t. to the `if'.

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven at sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619


More information about the cbe-oss-dev mailing list