From: Joe Perches <joe@perches.com>
To: "Łukasz Stelmach" <l.stelmach@samsung.com>,
"Andy Whitcroft" <apw@canonical.com>,
linux-kernel@vger.kernel.org,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: "Bartłomiej Żolnierkiewicz" <b.zolnierkie@samsung.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>
Subject: Re: [PATCH v2] checkpatch: ignore generated CamelCase defines and enum values
Date: Thu, 22 Oct 2020 11:51:09 -0700 [thread overview]
Message-ID: <c6bd7e8540bebf6b2a8571947d561f6bdcc7fe89.camel@perches.com> (raw)
In-Reply-To: <20201022184916.7904-1-l.stelmach@samsung.com>
On Thu, 2020-10-22 at 20:49 +0200, Łukasz Stelmach wrote:
> Ignore autogenerated CamelCase-like defines and enum values like
> DRM_MODE_CONNECTOR_Unknown or ETHTOOL_LINK_MODE_Asym_Pause_BIT.
>
> Syggested-by: Joe Perches <joe@perches.com>
> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
> ---
> Changes in v2
> - use a more general regexp suggested by Joe Perches
Andrew, can you pick this up please?
> scripts/checkpatch.pl | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index fab38b493cef..7e67d565e903 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -5295,6 +5295,8 @@ sub process {
> #CamelCase
> if ($var !~ /^$Constant$/ &&
> $var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
> +#Ignore some autogenerated defines and enum values
> + $var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ &&
> #Ignore Page<foo> variants
> $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
> #Ignore SI style variants like nS, mV and dB
prev parent reply other threads:[~2020-10-22 18:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20201022184920eucas1p11fbcddc199309d9de8b57d9636d7f6fb@eucas1p1.samsung.com>
2020-10-22 18:49 ` Łukasz Stelmach
2020-10-22 18:51 ` 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=c6bd7e8540bebf6b2a8571947d561f6bdcc7fe89.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=b.zolnierkie@samsung.com \
--cc=l.stelmach@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/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®