Hi Wolfgang,

Dear Dirk Eibach,

In message <49d89b84e14cf375d9e113fcc15ce...@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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to