Dear Stefano Babic,

In message <4d380e7f.60...@denx.de> you wrote:
>
> >     [U-Boot] [PATCH V2 08/11] SPI: mxc_spi: fix swapping bug and add
> >     total: 0 errors, 1 warnings, 22 lines checked
> 
> WARNING: braces {} are not necessary for single statement blocks
> #31: FILE: drivers/spi/mxc_spi.c:375:
> +                             for (i = 0; i < 4; i++) {
>                                       data = (data << 8) | (*dout++ & 0xFF);
>                               }
> 
> total: 0 errors, 1 warnings, 22 lines checked
> 
> This is exactly what you prefer, but checkpatch complains. IMHO I prefer
> to fix in this patch removing braces, and do not change in previous
> patches where you suggest to add braces (and then checkpatch will
> complain about it).

These are two _different_ situations.

Here we have a single statement on a single line.  This needs no
braces.


In the other case, we had a single stament split over multiple lines,
and with multiple lines I want to see braces.  And checkpatch appears
to be happy with braces then, too (and without as well).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"Ada is PL/I trying to be Smalltalk.                 - Codoso diBlini
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to