public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] checkpatch compliance
@ 2011-10-07 22:28 Joe Hershberger
  2011-10-09 19:22 ` Wolfgang Denk
  2011-11-17 20:10 ` Gerlando Falauto
  0 siblings, 2 replies; 34+ messages in thread
From: Joe Hershberger @ 2011-10-07 22:28 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

I'm attempting to make the files I touched in several recent
patch-series chechkpatch.pl compliant.

I've hit several cases which fail and probably shouldn't.  For each of
these cases, should the warning / error just be ignored or reported to
checkpatch maintainers or altered some other way?

ERROR: Macros with multiple statements should be enclosed in a do - while loop
+#define CONFIG_SYS_I2C_NOPROBES        { {0, 0x51} } /* Don't probe
these addrs */
Used like this:
static struct
{
        uchar   bus;
        uchar   addr;
} i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES;


ERROR: need consistent spacing around '/' (ctx:WxV)
+#define CONFIG_ROOTPATH                /nfs/root/path
Used like this:
#ifdef  CONFIG_ROOTPATH
        "rootpath="     MK_STR(CONFIG_ROOTPATH)         "\0"


ERROR: Macros with complex values should be enclosed in parenthesis
+#define CONFIG_ROOTPATH                /nfs/root/path


ERROR: Macros with complex values should be enclosed in parenthesis
+#define CONFIG_UBOOTPATH       u-boot.bin


ERROR: Macros with complex values should be enclosed in parenthesis
#218: FILE: include/configs/MPC8313ERDB.h:274:
+#define CONFIG_SYS_NAND_BR_PRELIM      (CONFIG_SYS_NAND_BASE \
                                | (2<<BR_DECC_SHIFT)    /* Use HW ECC */ \
-                               | BR_PS_8               /* Port Size =
8 bit */ \
+                               | BR_PS_8               /* 8 bit port */ \
                                | BR_MS_FCM             /* MSEL = FCM */ \
-                               | BR_V )                /* valid */
-#define CONFIG_SYS_NAND_OR_PRELIM      ( 0xFFFF8000            /*
length 32K */ \
+                               | BR_V)                 /* valid */


Thanks,
-Joe

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2011-11-18  7:25 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 22:28 [U-Boot] checkpatch compliance Joe Hershberger
2011-10-09 19:22 ` Wolfgang Denk
2011-10-12  1:41   ` [U-Boot] [PATCH] tools: checkpatch.pl from Linux added to tools Joe Hershberger
2011-10-13  2:54     ` Xiangfu Liu
2011-10-13  3:27     ` Mike Frysinger
2011-10-13 17:25       ` Joe Hershberger
2011-10-13 18:20         ` Mike Frysinger
2011-10-13 18:30           ` Joe Hershberger
2011-10-13 19:01             ` Mike Frysinger
2011-10-18 20:06     ` [U-Boot] [PATCH v2] " Joe Hershberger
2011-10-19 18:28       ` Joe Hershberger
2011-11-17 13:28       ` Wolfgang Denk
2011-10-12  1:42   ` [U-Boot] checkpatch compliance Joe Hershberger
2011-10-12  3:59   ` Mike Frysinger
2011-10-12  7:36     ` Wolfgang Denk
2011-10-12 17:57       ` Mike Frysinger
2011-10-12 18:41         ` Wolfgang Denk
2011-10-12 19:24           ` Mike Frysinger
2011-10-13 23:03           ` [U-Boot] [PATCH 1/2] common: cosmetic: CONFIG_ROOTPATH " Joe Hershberger
2011-10-13 22:34             ` Mike Frysinger
2011-10-21 23:21             ` Wolfgang Denk
2011-10-13 23:03           ` [U-Boot] [PATCH 2/2] common: cosmetic: CONFIG_BOOTFILE " Joe Hershberger
2011-10-13 22:34             ` Mike Frysinger
2011-10-13 22:41               ` Joe Hershberger
2011-10-21 23:21             ` Wolfgang Denk
2011-10-13  0:56   ` [U-Boot] " Joe Hershberger
2011-10-13  1:03     ` Mike Frysinger
2011-10-13 17:14       ` Joe Hershberger
2011-10-13 18:19         ` Mike Frysinger
2011-10-13 20:36     ` Wolfgang Denk
2011-11-17 20:10 ` Gerlando Falauto
2011-11-17 20:54   ` Wolfgang Denk
2011-11-18  7:25     ` Gerlando Falauto
2011-11-17 21:33   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox