qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL v2 71/73] scripts/checkpatch.pl: don't complain about (foo, /* emp


From: Alex Bennée
Subject: [PULL v2 71/73] scripts/checkpatch.pl: don't complain about (foo, /* empty */)
Date: Fri, 25 Oct 2019 07:37:11 +0100

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 <address@hidden>
Reviewed-by: Aaron Lindsay <address@hidden>

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index aa9a354a0e7..db67b4da872 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);
                }
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]