aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/checkpatch.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3257d3d96767..309050f30874 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2572,6 +2572,11 @@ sub process {
2572 WARN("plain inline is preferred over $1\n" . $herecurr); 2572 WARN("plain inline is preferred over $1\n" . $herecurr);
2573 } 2573 }
2574 2574
2575# check for sizeof(&)
2576 if ($line =~ /\bsizeof\s*\(\s*\&/) {
2577 WARN("sizeof(& should be avoided\n" . $herecurr);
2578 }
2579
2575# check for new externs in .c files. 2580# check for new externs in .c files.
2576 if ($realfile =~ /\.c$/ && defined $stat && 2581 if ($realfile =~ /\.c$/ && defined $stat &&
2577 $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) 2582 $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s)