Commit 1b36b201 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: Allow comments in macros tested for single statements

Convert all the comments to spaces before testing for single statement

Reported-by: default avatarValdis Kletnieks <>
Signed-off-by: default avatarJoe Perches <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 327953e9
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment