summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-07-03 15:05:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 16:07:44 -0700
commitfdb4bcd6108602097b9a1ebd11f6e61f331c8dce (patch)
treeecc8b5a175e5cf6c00f6351a803e967a719d484e /scripts
parent807bd26c4c3e94aced4630ba8369c8941728636b (diff)
downloadlinux-fdb4bcd6108602097b9a1ebd11f6e61f331c8dce.tar.gz
linux-fdb4bcd6108602097b9a1ebd11f6e61f331c8dce.tar.xz
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-xscripts/checkpatch.pl4
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 {
}
if ($realfile =~ m@^(drivers/net/|net/)@ &&
- $rawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
- $prevrawline =~ /^\+[ \t]*$/) {
+ $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
+ $rawline =~ /^\+[ \t]*\*/) {
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
}