lkml.org 
[lkml]   [2017]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: don't warn on every struct without const_structs file
From
Date
On Tue, 2017-01-10 at 07:01 -0800, Joe Perches wrote:
> On Tue, 2017-01-10 at 15:03 +0100, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > The script says that it won't warn:
> > "No structs that should be const will be found [...]"
> >
> > but then that doesn't work and it warns on every single struct
> > instead, since the regular expression ends up empty. Fix that
> > by checking that it's not empty first.
>
> nak.
>
> How does const_structs end up empty for you?

I copied checkpatch elsewhere and ran it.

Regardless, the current code is utterly stupid - it prints a warning
that it won't flag any structs, and then proceeds to flag all structs.

If you must, send a patch to abort() [whatever the perl equivalent is]
when the file can't be found, but as it is, the code is just idiotic.

johannes

\
 
 \ /
  Last update: 2017-01-10 16:05    [W:0.075 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site