
Dear Stefano Babic,
In message 4D380E7F.60506@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