Re: [PATCH 13/19 v2] staging: comedi: amplc_pci230: remove unnecessary braces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 30, 2014 at 03:04:03PM +0100, Ian Abbott wrote:
> On 2014-07-30 14:41, Dan Carpenter wrote:
> >On Wed, Jul 30, 2014 at 12:53:47PM +0100, Ian Abbott wrote:
> >>Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> >>---
> >>v2: Be less aggressive in brace removal.  Keep them for outer nested
> >>'if's.  Keep them in outer control statements where the inner control
> >>statement uses braces.
> >
> >Really every multi-line indent should have braces for readability.  This
> >isn't documented anywhere, but it's normal kernel style and Greg prefers
> >it for staging as well but I can't find the URL on google where he
> >mentioned that.
> 
> With this version of the patch, amplc_pci230.c conforms to that --
> as long as you don't count comments, or splitting a simple statement
> across multiple lines to fit within 80 columns, e.g.:
> 
> 			if (foo)
> 				/* do this */
> 				bar = baz +
> 				      qux;

Heh...  I am counting comments and broken lines, though.  It's not a
totally strict rule and it's especially not strict for broken lines.
But we would prefer braces in those situations.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux