From: Joe Perches Date: Thu, 3 Apr 2014 21:49:20 +0000 (-0700) Subject: checkpatch: ignore networking block comment style first lines in file X-Git-Tag: v3.15-rc1~106^2~84 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=85ad978c626a425c0bacd137bf15403e867c9134;p=karo-tx-linux.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ae9f71d27a85..c624b04d0070 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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); }