Re: [PATCH] scripts/checkpatch.pl - fix *_NOTIFIER_HEAD handling
From: Joe Perches
Date: Thu Aug 08 2019 - 02:17:46 EST
On Thu, 2019-08-08 at 02:08 -0400, Valdis KlÄtnieks wrote:
> On Wed, 07 Aug 2019 22:50:47 -0700, Joe Perches said:
> > On Wed, 2019-08-07 at 21:36 -0400, Valdis Kltnieks wrote:
> > > ^.DEFINE_$Ident\(\Q$name\E\)|
> > > ^.DECLARE_$Ident\(\Q$name\E\)|
> > > ^.LIST_HEAD\(\Q$name\E\)|
> > > - ^.{$Ident}_NOTIFIER_HEAD\(\Q$name\E\)|
> > > + ^.${Ident}_NOTIFIER_HEAD\(\Q$name\E\)|
> >
> > Perhaps also better to convert all the '\Q$name\E' to '\s*\Q$name\E\s*'
>
> Yes, but that would need to be a separate patch.
Maybe so.
I'm just not a big fan of micro patches.
> The question would be if we
> consider 'DEFINE_foo( barbaz )' and similar with whitespace to be desirable
> style or not.
Oh, it would definitely be an uncomfortable style,
it's just allowing it in the regex.
btw: I'm also fine with it being a separate global patch.
cheers, Joe
> We already have the \s* in one place. Somebody else can decide if it should
> be in the other 5 places or not. :)
Is that supposed to be me? ;)