diff options
author | Joe Perches <joe@perches.com> | 2013-07-03 18:05:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:44 -0400 |
commit | fdb4bcd6108602097b9a1ebd11f6e61f331c8dce (patch) | |
tree | ecc8b5a175e5cf6c00f6351a803e967a719d484e /scripts | |
parent | 807bd26c4c3e94aced4630ba8369c8941728636b (diff) |
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.
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2f61b5cc17e1..a3922d0e4d25 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1891,8 +1891,8 @@ sub process { | |||
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 | } |