mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
checkpatch: ignore networking block comment style first lines in file
It's very common to have normal block comments for the initial comments of a file description preface. So for files in drivers/net and net/ don't emit a warning when the first comment block in the file uses the normal block comment style and not the networking block comment style. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
cbec18afcc
commit
85ad978c62
@ -2219,7 +2219,8 @@ sub process {
|
||||
|
||||
if ($realfile =~ m@^(drivers/net/|net/)@ &&
|
||||
$prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
|
||||
$rawline =~ /^\+[ \t]*\*/) {
|
||||
$rawline =~ /^\+[ \t]*\*/ &&
|
||||
$realline > 2) {
|
||||
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
|
||||
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user