
On 01/20/2011 10:32 AM, Wolfgang Denk wrote:
Dear Stefano Babic,
In message 1295513194-16158-9-git-send-email-sbabic@denx.de you wrote:
From: Anatolij Gustschin agust@denx.de
We need to shift only one time in each cycle in the swapping loop for unaligned tx case. Currently two byte shift operations are performed in each loop cycle causing zero gaps in the transmited data, so not all data scheduled for transmition is actually transmited.
The proper swapping in unaligned rx case is missing, so add it as we need to put the received data into the rx buffer in the correct byte order.
Signed-off-by: Anatolij Gustschin agust@denx.de Tested-by: Stefano Babic sbabic@denx.de
Checkpatch says:
[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).
Best regards, Stefano Babic