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: <62b0e423d7e0fa043438f01cec274d9e1966440c.camel@perches.com>
Date:   Thu, 27 Oct 2022 07:28:04 -0700
From:   Joe Perches <joe@...ches.com>
To:     Stanislaw Gruszka <stf_xl@...pl>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Whitcroft <apw@...onical.com>
Cc:     Dwaipayan Ray <dwaipayanray1@...il.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] scripts: checkpatch: allow "case" macros

On Thu, 2022-10-27 at 15:43 +0200, Stanislaw Gruszka wrote:
> Do not report errors like below:
> 
> ./scripts/checkpatch.pl -f drivers/net/wireless/ath/ath10k/wmi.h
> 
> ERROR: Macros with complex values should be enclosed in parentheses
> +#define C2S(x) case x: return #x
> 
> since many "case ..." macros are already used by some in-kernel drivers.
> 
> Signed-off-by: Stanislaw Gruszka <stf_xl@...pl>

Acked-by: Joe Perches <joe@...ches.com>

> ---
>  scripts/checkpatch.pl | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 1e5e66ae5a52..4b888b1313d5 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -5901,6 +5901,7 @@ sub process {
>  			    $dstat !~ /$exceptions/ &&
>  			    $dstat !~ /^\.$Ident\s*=/ &&				# .foo =
>  			    $dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ &&		# stringification #foo
> +			    $dstat !~ /^case\b/ &&					# case ...
>  			    $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ &&	# do {...} while (...); // do {...} while (...)
>  			    $dstat !~ /^while\s*$Constant\s*$Constant\s*$/ &&		# while (...) {...}
>  			    $dstat !~ /^for\s*$Constant$/ &&				# for (...)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ