[U-Boot] checkpatch compliance

Wolfgang Denk wd at denx.de
Sun Oct 9 21:22:33 CEST 2011


Dear Joe Hershberger,

In message <CANr=Z=Y+Q6AoJ-+gkc+YDeAPGcLsaQkPCzAmhJcRNwts9jXJzw at mail.gmail.com> you wrote:
> 
> 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?

Please see this message / thread:

http://thread.gmane.org/gmane.linux.kernel/1130494/focus=1172475

It would be best if we
1) copied the current checkpatch.pl from Linux to tools/checkpatch.pl
   (which would also make it easier for all to use the same version)
and
2) provide a customized U-Boot specific .config file that takes care
   about things like the ones you list.

> ERROR: need consistent spacing around '/' (ctx:WxV)
> +#define CONFIG_ROOTPATH                /nfs/root/path

Actually this is IMO wrong.  Should it not be "/nfs/root/path"
instead?

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

Ditto here.

> 
> 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 */

I think this one should actually be reported.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What is wanted is not the will to believe,  but the will to find out,
which is the exact opposite.
		        -- Bertrand Russell, "Skeptical Essays", 1928


More information about the U-Boot mailing list