Re: [PATCH v2] checkpatch.pl: Warn on duplicate sysctl local variable

From: Joe Perches
Date: Fri May 31 2019 - 06:30:40 EST


On Fri, 2019-05-31 at 10:44 +0200, Matteo Croce wrote:
> On May 31, 2019 5:06:58 AM GMT+02:00, Joe Perches <joe@xxxxxxxxxxx> wrote:
> > On Fri, 2019-05-31 at 03:12 +0200, Matteo Croce wrote:
> > > +
> > > +# check for sysctl duplicate constants
> > > + if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max|max_int)\b/) {
> >
> > why max_int, there isn't a single use of it in the kernel ?
>
> Because you can never know how a local variabile will be called.
> I wanted to add intmax and maxint too, bit it seemed too much.

I think that checkpatch should not speculate about things like this.