[U-Boot] [PATCH v2 05/10] powerpc/ppc4xx: Support gdsys multichannel iocon hardware

Dirk Eibach dirk.eibach at gdsys.cc
Mon May 6 17:49:26 CEST 2013


Hi Wolfgang,

> Dear Dirk Eibach,
> 
> In message <49d89b84e14cf375d9e113fcc15ce289 at gdsys.cc> you wrote:
>> 
>>> Please fix the checkpatch errors.
>> 
>> if we are talking about:
>> 
>> CHECK: Blank lines aren't necessary before a close brace '}'
>> #491: FILE: include/configs/iocon.h:141:
>> +
>> +#define CONFIG_SYS_CH7301_I2C			{1, 2, 3, 4}
>> 
>> 
>> This seems to be a false positive.
> 
> No, I'm referring to these:
> 
> ERROR: Macros with complex values should be enclosed in parenthesis
> #595: FILE: include/configs/iocon.h:151:
> +#define I2C_READ	fpga_gpio_get(I2C_ADAP_HWNR, 0x0040) ? 1 : 0
> 
> ERROR: Macros with multiple statements should be enclosed in a do - 
> while loop
> #596: FILE: include/configs/iocon.h:152:
> +#define I2C_SDA(bit)	if (bit) \
> +					fpga_gpio_set(I2C_ADAP_HWNR, 0x0040); \
> +				else \
> +					fpga_gpio_clear(I2C_ADAP_HWNR, 0x0040)
> 
> ERROR: Macros with multiple statements should be enclosed in a do - 
> while loop
> #600: FILE: include/configs/iocon.h:156:
> +#define I2C_SCL(bit)	if (bit) \
> +					 fpga_gpio_set(I2C_ADAP_HWNR, 0x0020); \
> +				else \
> +					fpga_gpio_clear(I2C_ADAP_HWNR, 0x0020)
> 
> total: 3 errors, 0 warnings, 509 lines checked

OK, thanks, that makes sense. Which version of checkpatch are you 
using? Latest u-boot master checkpatch/patman does not show these (at 
least not for me).

Cheers
Dirk



More information about the U-Boot mailing list