From: Sergey Senozhatsky Date: Thu, 9 Nov 2023 07:51:38 +0000 (+0900) Subject: checkpatch: do not require an empty line before error injection X-Git-Tag: v6.8-rc1~179^2~130 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=71aa3419e98f6e23bddc3aca9ec4ac368836a109;p=linux-block.git checkpatch: do not require an empty line before error injection ALLOW_ERROR_INJECTION macro (just like EXPORT_SYMBOL) can immediately follow a function it annotates. Link: https://lkml.kernel.org/r/20231109075147.2779461-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Joe Perches Cc: Andy Whitcroft (maintainer:CHECKPATCH) Cc: Dwaipayan Ray (reviewer:CHECKPATCH) Cc: Lukas Bulwahn Signed-off-by: Andrew Morton --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 25fdb7fda112..a94ed6c46a6d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4054,7 +4054,7 @@ sub process { if ($prevline =~ /^[\+ ]};?\s*$/ && $line =~ /^\+/ && !($line =~ /^\+\s*$/ || - $line =~ /^\+\s*(?:EXPORT_SYMBOL|early_param)/ || + $line =~ /^\+\s*(?:EXPORT_SYMBOL|early_param|ALLOW_ERROR_INJECTION)/ || $line =~ /^\+\s*MODULE_/i || $line =~ /^\+\s*\#\s*(?:end|elif|else)/ || $line =~ /^\+[a-z_]*init/ ||