Re: drop overzealous ERROR: do not initialise statics to 0 or NULL from checkpatch.pl

From: Arnd Bergmann
Date: Wed Aug 13 2008 - 08:16:11 EST


On Wednesday 13 August 2008, John Kacur wrote:
> Could we drop this somewhat overzealous "ERROR: do not initialise
> statics to 0 or NULL" from checkpatch.pl?

I totally agree we should drop it.

> Reasoning:
> 1. This is not part of Documentation/CodingStyle

However, it is in http://kernel-janitor.sourceforge.net/TODO and should
be dropped from there as well.

> 3. It can be a good form of documentation.

I don't think so. Every C programmer should know that it is the
same.

> 5. It doesn't even change the object size (thus kernel size) to do so.
> Demo with user space code.

I'm not sure what the last compiler version was on which it made the
difference, probably 2.95 or 3.0 or something else that is no longer
supported.
I do remember that at some point in time, we could save a few bytes by
doing it.

Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/