aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-05-25 02:38:26 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-25 02:38:26 -0400
commitb1e50ebcf24668e57f058deb48b0704b5391ed0f (patch)
tree17e1b69b249d0738317b732186340c9dd053f1a1 /scripts/checkpatch.pl
parent0c2a2ae32793e3500a15a449612485f5d17dd431 (diff)
parent7e125f7b9cbfce4101191b8076d606c517a73066 (diff)
Merge remote branch 'origin' into secretlab/next-spi
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a4d74344d805..f2bbea900700 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2656,6 +2656,7 @@ sub process {
2656# check for semaphores used as mutexes 2656# check for semaphores used as mutexes
2657 if ($line =~ /^.\s*init_MUTEX_LOCKED\s*\(/) { 2657 if ($line =~ /^.\s*init_MUTEX_LOCKED\s*\(/) {
2658 WARN("consider using a completion\n" . $herecurr); 2658 WARN("consider using a completion\n" . $herecurr);
2659
2659 } 2660 }
2660# recommend strict_strto* over simple_strto* 2661# recommend strict_strto* over simple_strto*
2661 if ($line =~ /\bsimple_(strto.*?)\s*\(/) { 2662 if ($line =~ /\bsimple_(strto.*?)\s*\(/) {
@@ -2740,6 +2741,16 @@ sub process {
2740 WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); 2741 WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr);
2741 } 2742 }
2742 } 2743 }
2744
2745# check for lockdep_set_novalidate_class
2746 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
2747 $line =~ /__lockdep_no_validate__\s*\)/ ) {
2748 if ($realfile !~ m@^kernel/lockdep@ &&
2749 $realfile !~ m@^include/linux/lockdep@ &&
2750 $realfile !~ m@^drivers/base/core@) {
2751 ERROR("lockdep_no_validate class is reserved for device->mutex.\n" . $herecurr);
2752 }
2753 }
2743 } 2754 }
2744 2755
2745 # If we have no input at all, then there is nothing to report on 2756 # If we have no input at all, then there is nothing to report on