summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-02-13 14:38:32 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-13 21:21:39 -0800
commit1b36b201c081ddb6ced1983c5ebf75fa635b6e4b (patch)
tree50b91fe85dfacb31415e712e4771e3b81a319c3c /scripts
parent327953e9af6c59ad111b28359e59e3ec0cbd71b6 (diff)
downloadlwn-1b36b201c081ddb6ced1983c5ebf75fa635b6e4b.tar.gz
lwn-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>
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 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;