diff options
author | Joe Perches <joe@perches.com> | 2015-02-13 17:38:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 00:21:39 -0500 |
commit | 1b36b201c081ddb6ced1983c5ebf75fa635b6e4b (patch) | |
tree | 50b91fe85dfacb31415e712e4771e3b81a319c3c /scripts | |
parent | 327953e9af6c59ad111b28359e59e3ec0cbd71b6 (diff) |
checkpatch: Allow comments in macros tested for single statements
Convert all the comments to spaces before testing for single statement
macros.
Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6afc24ba77a6..6ac355edd0dc 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -4260,6 +4260,7 @@ sub process { | |||
4260 | $ctx = $dstat; | 4260 | $ctx = $dstat; |
4261 | 4261 | ||
4262 | $dstat =~ s/\\\n.//g; | 4262 | $dstat =~ s/\\\n.//g; |
4263 | $dstat =~ s/$;/ /g; | ||
4263 | 4264 | ||
4264 | if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) { | 4265 | if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) { |
4265 | my $stmts = $2; | 4266 | my $stmts = $2; |