[U-Boot] checkpatch compliance
Mike Frysinger
vapier at gentoo.org
Thu Nov 17 22:33:27 CET 2011
On Thursday 17 November 2011 15:10:22 Gerlando Falauto wrote:
> On 10/08/2011 12:28 AM, Joe Hershberger wrote:
> > 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?
>
> What is wrong with something like:
>
> ERROR: do not initialise statics to 0 or NULL
> #35: FILE: serial.c:32:
> +static struct serial_device *serial_devices = NULL;
>
> ERROR: do not initialise statics to 0 or NULL
> #36: FILE: serial.c:33:
> +static struct serial_device *serial_current = NULL;
newer gcc is smart enough to put these into .bss. i think older ones were not
and put these into .data. in either case, the initialization is redundant (by
virtue of the "static"), so i'd just drop the "= NULL".
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111117/872b3a32/attachment.pgp>
More information about the U-Boot
mailing list