lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c6bd7e8540bebf6b2a8571947d561f6bdcc7fe89.camel@perches.com>
Date:   Thu, 22 Oct 2020 11:51:09 -0700
From:   Joe Perches <joe@...ches.com>
To:     Łukasz Stelmach <l.stelmach@...sung.com>,
        Andy Whitcroft <apw@...onical.com>,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Bartłomiej Żolnierkiewicz 
        <b.zolnierkie@...sung.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH v2] checkpatch: ignore generated CamelCase defines and
 enum values

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@...ches.com>
> Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ