mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
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>
This commit is contained in:
parent
45f4d02435
commit
4882720b26
2 changed files with 2 additions and 12 deletions
|
|
@ -2794,12 +2794,8 @@ sub process {
|
|||
WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);
|
||||
}
|
||||
|
||||
# check for semaphores used as mutexes
|
||||
if ($line =~ /^.\s*(DECLARE_MUTEX|init_MUTEX)\s*\(/) {
|
||||
WARN("mutexes are preferred for single holder semaphores\n" . $herecurr);
|
||||
}
|
||||
# check for semaphores used as mutexes
|
||||
if ($line =~ /^.\s*init_MUTEX_LOCKED\s*\(/) {
|
||||
# check for semaphores initialized locked
|
||||
if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
|
||||
WARN("consider using a completion\n" . $herecurr);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue