On Thu, Feb 06, 2014 at 01:07:44PM +0100, Wolfgang Denk wrote: > Dear Tim, > > In message > <caj+vnu2udv1yeujh79uznf01jtamde7p8u-g_x1hendg7mk...@mail.gmail.com> you > wrote: [snip] > > > This causes a checkpatch error: > > > > > > ERROR: Macros with complex values should be enclosed in parenthesis > > > > > > Please fix! > > > > what args do you run checkpatch.pl with? The default args does not > > check COMPLEX_MACRO it would seem which is why I missed that. > > It appears I happen to run an older version of checkpatch.pl; I have > no idea why COMPLEX_MACRO (and MULTISTATEMENT_MACRO_USE_DO_WHILE) are > disabled in the current code. > > > Tom, what do you think? Should we not activate the COMPLEX_MACRO and > MULTISTATEMENT_MACRO_USE_DO_WHILE checks?
So, checking .checkpatch.conf: # Temporary for false positive in checkpatch --ignore COMPLEX_MACRO # For CONFIG_SYS_I2C_NOPROBES --ignore MULTISTATEMENT_MACRO_USE_DO_WHILE Yanking these out, and running checkpatch on this patch. It complains about CONFIG_SERVERIP/CONFIG_IPADDR, uselessly. It complains about CONFIG_SPI_FLASH_WINBOND_ERASESIZE which is unused anywhere (which is the real problem with it). It also complains about MINMAX, which is a funny one. I think the warning is a correct one. In sum, I think our comment about leaving COMPLEX_MACRO out due to false positive is correct for now at least, we can revisit as part of Kconfig later when I think we'll be removing the cases where we add things like CONFIG_SERVERIP/etc. And unrelated to Wolfgang's question, Tim, please make sure your code doesn't add new warnings: gw_ventana.c: In function ‘read_eeprom’: gw_ventana.c:396:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] gw_ventana.c:403:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] gw_ventana.c:413:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] gw_ventana.c: In function ‘setup_board_gpio’: gw_ventana.c:804:25: warning: initialization from incompatible pointer type [enabled by default] pmic_pfuze100.c: In function ‘pmic_init’: pmic_pfuze100.c:17:6: warning: unused variable ‘ret’ [-Wunused-variable] -- Tom
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot