lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171106205430.GR18478@eros>
Date:   Tue, 7 Nov 2017 07:54:30 +1100
From:   "Tobin C. Harding" <me@...in.cc>
To:     Joe Perches <joe@...ches.com>
Cc:     Andy Whitcroft <apw@...onical.com>, linux-kernel@...r.kernel.org
Subject: Re: checkpatch potential false positive

On Mon, Nov 06, 2017 at 07:29:18AM -0800, Joe Perches wrote:
> On Mon, 2017-11-06 at 08:33 +0000, Andy Whitcroft wrote:
> > On Mon, Nov 06, 2017 at 03:19:14PM +1100, Tobin C. Harding wrote:
> > > Hi,
> 
> Hello.
> 
> > > When parsing drivers/staging/unisys/visorbus/visorchipset.c in Greg's
> > > staging tree checkpatch emits
> > > 
> > > --------------
> > > visorchipset.c
> > > --------------
> > > WARNING: char * array declaration might be better as static const
> > > #1050: FILE: visorchipset.c:1050:
> > > +	char *envp[] = { env_cmd, env_id, env_state, env_bus, env_dev,
> > > 
> > > WARNING: char * array declaration might be better as static const
> > > #1140: FILE: visorchipset.c:1140:
> > > +	char *envp[] = { env_selftest, NULL };
> > > 
> > > total: 0 errors, 2 warnings, 1694 lines checked
> > > 
> > > I may be wrong but I think the code in question is clean and
> > > correct. Since checkpatch is saying this _might_ be better ... perhaps
> > > checkpatch could emit CHECK instead of WARNING for this?
> 
> CHECKs aren't enabled by default except for a few
> directories and this warning is much more commonly
> correct than incorrect.

Ok, thanks.

> checkpatch will always have both false positives and
> false negatives.  It's stupid, people generally aren't.
> 
> Just ignore checkpatch bleats that aren't appropriate.

Got it, cheers Andy.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ