From: Alex Bennée Date: Thu, 17 Oct 2019 11:58:17 +0000 (+0100) Subject: scripts/checkpatch.pl: don't complain about (foo, /* empty */) X-Git-Tag: v4.2.0-rc0~20^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca68668d27ea024fb7bbb7baf2c573550181ec23;p=thirdparty%2Fqemu.git scripts/checkpatch.pl: don't complain about (foo, /* empty */) It's quite common to have a mini comment inside braces to acknowledge we know it's empty. Expand the inline detection to allow closing braces before the end of line. Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ab68a16fd22..3aef6e3dfe0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1639,7 +1639,7 @@ sub process { # Block comment styles # Block comments use /* on a line of its own - if ($rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/ + if ($rawline !~ m@^\+.*/\*.*\*/[ \t)}]*$@ && #inline /*...*/ $rawline =~ m@^\+.*/\*\*?+[ \t]*[^ \t]@) { # /* or /** non-blank WARN("Block comments use a leading /* on a separate line\n" . $herecurr); }