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/checkpatch.pl (1 of 1 file). Show all

Unified · Split

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