From: Mike Frysinger Date: Thu, 17 Nov 2011 16:33:27 -0500 Subject: [U-Boot] checkpatch compliance In-Reply-To: <4EC56A2E.2000708@keymile.com> References: <4EC56A2E.2000708@keymile.com> Message-ID: <201111171633.29471.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: