diff options
author | Joe Perches <joe@perches.com> | 2015-02-13 23:38:32 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 06:21:39 +0100 |
commit | 1b36b201c081ddb6ced1983c5ebf75fa635b6e4b (patch) | |
tree | 50b91fe85dfacb31415e712e4771e3b81a319c3c | |
parent | checkpatch: add check for keyword 'boolean' in Kconfig definitions (diff) | |
download | linux-1b36b201c081ddb6ced1983c5ebf75fa635b6e4b.tar.xz linux-1b36b201c081ddb6ced1983c5ebf75fa635b6e4b.zip |
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>
-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 { $ctx = $dstat; $dstat =~ s/\\\n.//g; + $dstat =~ s/$;/ /g; if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) { my $stmts = $2; |