From 15b982492a1fa8a3e75efd06b263121eda70e3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz> Date: Wed, 16 Feb 2022 03:02:00 +0100 Subject: [PATCH] cstyle: forbid ARGSUSED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro Colomar <alx.manpages@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia ZiemiaĆska <nabijaczleweli@nabijaczleweli.xyz> Closes #13110 --- scripts/cstyle.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/cstyle.pl b/scripts/cstyle.pl index d19718ecf4..d4563cdc9f 100755 --- a/scripts/cstyle.pl +++ b/scripts/cstyle.pl @@ -140,7 +140,7 @@ my %old2posix = ( ); my $lint_re = qr/\/\*(?: - ARGSUSED[0-9]*|NOTREACHED|LINTLIBRARY|VARARGS[0-9]*| + NOTREACHED|LINTLIBRARY|VARARGS[0-9]*| CONSTCOND|CONSTANTCOND|CONSTANTCONDITION|EMPTY| FALLTHRU|FALLTHROUGH|LINTED.*?|PRINTFLIKE[0-9]*| PROTOLIB[0-9]*|SCANFLIKE[0-9]*|CSTYLED.*? @@ -385,6 +385,9 @@ line: while (<$filehandle>) { if (/[^ \t(]\/\*/ && !/\w\(\/\*.*\*\/\);/) { err("comment preceded by non-blank"); } + if (/ARGSUSED/) { + err("ARGSUSED directive"); + } # is this the beginning or ending of a function? # (not if "struct foo\n{\n")