diff options
| author | NeilBrown <neilb@suse.de> | 2010-05-22 08:31:36 +1000 |
|---|---|---|
| committer | NeilBrown <neilb@suse.de> | 2010-05-22 08:31:36 +1000 |
| commit | 19fdb9eefb21b72edbc365b838502780c392bad6 (patch) | |
| tree | deae04c48532d6eab64ed4b0396737bb854b5506 /scripts/checkpatch.pl | |
| parent | be6800a73aa2f3dc14744c3b80e676d189789f04 (diff) | |
| parent | 3ff195b011d7decf501a4d55aeed312731094796 (diff) | |
| download | cachepc-linux-19fdb9eefb21b72edbc365b838502780c392bad6.tar.gz cachepc-linux-19fdb9eefb21b72edbc365b838502780c392bad6.zip | |
Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus
Conflicts:
drivers/md/md.c
- Resolved conflict in md_update_sb
- Added extra 'NULL' arg to new instance of sysfs_get_dirent.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 11 |
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 { # check for semaphores used as mutexes if ($line =~ /^.\s*init_MUTEX_LOCKED\s*\(/) { WARN("consider using a completion\n" . $herecurr); + } # recommend strict_strto* over simple_strto* if ($line =~ /\bsimple_(strto.*?)\s*\(/) { @@ -2740,6 +2741,16 @@ sub process { WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); } } + +# check for lockdep_set_novalidate_class + if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ || + $line =~ /__lockdep_no_validate__\s*\)/ ) { + if ($realfile !~ m@^kernel/lockdep@ && + $realfile !~ m@^include/linux/lockdep@ && + $realfile !~ m@^drivers/base/core@) { + ERROR("lockdep_no_validate class is reserved for device->mutex.\n" . $herecurr); + } + } } # If we have no input at all, then there is nothing to report on |
