Commit ca68668d authored by Alex Bennée's avatar Alex Bennée
Browse files

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: default avatarAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: default avatarAaron Lindsay <aaron@os.amperecomputing.com>
parent 4fbddb5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
		}