summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-07-23 09:12:03 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-07-23 09:12:03 +1000
commit41b7b31afa406739d87584abf7bbb6983f1e81a0 (patch)
tree3f4a91c31fb24f93fa06e50ef80c88a75597cbcc /scripts
parent5105702f8ccf86d7fc961dd1cafad41c18a86c04 (diff)
checkpatch: add test for blank lines after function/struct/union/enum declarations
V2: Fix a problem with patch context lines by checking the line after the closing brace is an insertion. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1ba95b2a23c4..9e4ba9fa9bc8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2295,6 +2295,7 @@ sub process {
# check for missing blank lines after struct/union declarations
# with exceptions for various attributes and macros
if ($prevline =~ /^[\+ ]};?\s*$/ &&
+ $line =~ /^\+/ &&
!($line =~ /^\+\s*$/ ||
$line =~ /^\+\s*EXPORT_SYMBOL/ ||
$line =~ /^\+\s*MODULE_/i ||