]> git.baikalelectronics.ru Git - kernel.git/commitdiff
checkpatch: add early_param exception to blank line after struct/function test
authorJoe Perches <joe@perches.com>
Wed, 23 Mar 2022 23:06:02 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2022 02:00:34 +0000 (19:00 -0700)
Add early_param as another exception to the blank line preferred after
function/struct/union declaration or definition test.

Link: https://lkml.kernel.org/r/3bd6ada59f411a7685d7e64eeb670540d4bfdcde.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 046a018093a7b9d0c6936898d26323ddc7dc904d..2653177f52d90254a2a8531c76c0e81ebb0c1059 100755 (executable)
@@ -3926,7 +3926,7 @@ sub process {
                if ($prevline =~ /^[\+ ]};?\s*$/ &&
                    $line =~ /^\+/ &&
                    !($line =~ /^\+\s*$/ ||
-                     $line =~ /^\+\s*EXPORT_SYMBOL/ ||
+                     $line =~ /^\+\s*(?:EXPORT_SYMBOL|early_param)/ ||
                      $line =~ /^\+\s*MODULE_/i ||
                      $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
                      $line =~ /^\+[a-z_]*init/ ||