From 1b36b201c081ddb6ced1983c5ebf75fa635b6e4b Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 13 Feb 2015 14:38:32 -0800 Subject: 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 Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6afc24b..6ac355e 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; -- cgit v1.1