summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a3922d0e4d25..576139a508a3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1898,6 +1898,14 @@ sub process {
}
if ($realfile =~ m@^(drivers/net/|net/)@ &&
+ $prevrawline =~ /^\+[ \t]*\/\*/ && #starting /*
+ $prevrawline !~ /\*\/[ \t]*$/ && #no trailing */
+ $rawline !~ /^\+[ \t]*\*/) { #no leading *
+ WARN("NETWORKING_BLOCK_COMMENT_STYLE",
+ "networking block comments start with * on subsequent lines\n" . $hereprev);
+ }
+
+ if ($realfile =~ m@^(drivers/net/|net/)@ &&
$rawline !~ m@^\+[ \t]*\*/[ \t]*$@ && #trailing */
$rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/
$rawline !~ m@^\+.*\*{2,}/[ \t]*$@ && #trailing **/