mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Matteo Croce <mcroce@redhat.com>,
	linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Cc: Kees Cook <keescook@chromium.org>,
	Aaron Tomlin <atomlin@redhat.com>,
	Matthew Wilcox <willy@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] checkpatch.pl: Warn on duplicate sysctl local variable
Date: Fri, 31 May 2019 03:26:53 -0700	[thread overview]
Message-ID: <82dcf6a5726da3bfa39f756a46d2fcf248796150.camel@perches.com> (raw)
In-Reply-To: <B6174D2A-C9E8-438D-A042-C39CAAA35728@redhat.com>

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@perches.com> 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.



      reply	other threads:[~2019-05-31 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31  1:12 Matteo Croce
2019-05-31  2:04 ` Kees Cook
2019-05-31  3:06 ` Joe Perches
2019-05-31  8:44   ` Matteo Croce
2019-05-31 10:26     ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82dcf6a5726da3bfa39f756a46d2fcf248796150.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=atomlin@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcroce@redhat.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®