]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
checkpatch: improve network block comment test and message
authorJoe Perches <joe@perches.com>
Wed, 19 Jun 2013 00:07:19 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:05 +0000 (17:27 +1000)
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>
scripts/checkpatch.pl

index 2f61b5cc17e19dc948a2db2826a47fa9581c72ef..a3922d0e4d252200de359f4c70152c104eb7d5bf 100755 (executable)
@@ -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);
                }