diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-07 10:34:01 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-30 06:12:50 -0400 |
commit | 4882720b267b7b1d1b0ce08334b205f0329d4615 (patch) | |
tree | dd54880f84b7b7fb2bbdb529ffada434aca1e4d9 /scripts/checkpatch.pl | |
parent | 45f4d0243525b6bc747c946937ced437b135a84d (diff) |
semaphore: Remove mutex emulation
Semaphores used as mutexes have been deprecated for years. Now that
all users are either converted to real semaphores or to mutexes remove
the cruft.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
LKML-Reference: <20100907125057.562399240@linutronix.de>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 90b54d4697fd..e3c7fc0dca38 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -2794,12 +2794,8 @@ sub process { | |||
2794 | WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); | 2794 | WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); |
2795 | } | 2795 | } |
2796 | 2796 | ||
2797 | # check for semaphores used as mutexes | 2797 | # check for semaphores initialized locked |
2798 | if ($line =~ /^.\s*(DECLARE_MUTEX|init_MUTEX)\s*\(/) { | 2798 | if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) { |
2799 | WARN("mutexes are preferred for single holder semaphores\n" . $herecurr); | ||
2800 | } | ||
2801 | # check for semaphores used as mutexes | ||
2802 | if ($line =~ /^.\s*init_MUTEX_LOCKED\s*\(/) { | ||
2803 | WARN("consider using a completion\n" . $herecurr); | 2799 | WARN("consider using a completion\n" . $herecurr); |
2804 | 2800 | ||
2805 | } | 2801 | } |