History

checkpatch: improve network block comment test and message

Show the first line of the comment after a line with just /* to better show where the defective comment style is in the file.

Joe Perches committed 13 years ago

Commit fdb4bcd1 parent 807bd261 file · +2 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+2−2
@@ -1891,8 +1891,8 @@ sub process { · 1890 unmodified lines
18911891 }
18921892
18931893 if ($realfile =~ m@^(drivers/net/|net/)@ &&
1894− $rawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
1895− $prevrawline =~ /^\+[ \t]*$/) {
1894+ $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
1895+ $rawline =~ /^\+[ \t]*\*/) {
18961896 WARN("NETWORKING_BLOCK_COMMENT_STYLE",
18971897 "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
18981898 }