]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
scripts/checkpatch.pl: don't complain about (foo, /* empty */)
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 17 Oct 2019 11:58:17 +0000 (12:58 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 28 Oct 2019 15:12:38 +0000 (15:12 +0000)
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 <alex.bennee@linaro.org>
Reviewed-by: Aaron Lindsay <aaron@os.amperecomputing.com>
scripts/checkpatch.pl

index ab68a16fd228f7ccd30b1f91dae78cde54cf512a..3aef6e3dfe0f1e748d3dd79d9de355ac73cad5d0 100755 (executable)
@@ -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);
                }