[U-Boot] [PATCH 2/8] net/net.c: cosmetic: variable initializations

Luca Ceresoli luca.ceresoli at comelit.it
Wed May 4 18:42:30 CEST 2011


Mike Frysinger wrote:
> On Wed, May 4, 2011 at 08:40, Luca Ceresoli wrote:
>>   - ERROR: that open brace { should be on the previous line
>> ...
>> -uchar          NetCDPAddr[6] =
>> -                       { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc };
>> +uchar          NetCDPAddr[6] = {
>> +                       0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc };
>> ...
> your fix here is worse than the original.  just leave them be.

Damn, you're right!

I think a one-line solution would be even better (and much simpler):

uchar           NetCDPAddr[6] = {0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc};

BTW, this is the original checkpatch message:
   ERROR: that open brace { should be on the previous line
   #172: FILE: net.c:172:
   +uchar          NetCDPAddr[6] =
   +                       { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc };

So either we choose the one-line solution above, or we have the first
checkpatch message that should be disabled in the U-Boot version, when it
will exist.

Your opinion?

Luca




More information about the U-Boot mailing list