From e3f95d66ed4cfe8c935eed411e556d9cf7702869 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 23 Jan 2011 15:30:09 +0100 Subject: [PATCH] --- yaml --- r: 234321 b: refs/heads/master c: d04fa5a3ba06c3b7a1c4a6860d0fa4825507a755 h: refs/heads/master i: 234319: 976fd4417d31bcd6df3e0307d7bc8a99ea06032b v: v3 --- [refs] | 2 +- trunk/Documentation/spinlocks.txt | 24 +----------------------- trunk/include/linux/rwlock_types.h | 8 -------- trunk/include/linux/spinlock_types.h | 8 -------- trunk/scripts/checkpatch.pl | 5 ----- 5 files changed, 2 insertions(+), 45 deletions(-) diff --git a/[refs] b/[refs] index fdf1bae6f311..277cb5d8bca5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 10389a15e25fd4784d42de7e0e3fc8c242f2011d +refs/heads/master: d04fa5a3ba06c3b7a1c4a6860d0fa4825507a755 diff --git a/trunk/Documentation/spinlocks.txt b/trunk/Documentation/spinlocks.txt index 178c831b907d..2e3c64b1a6a5 100644 --- a/trunk/Documentation/spinlocks.txt +++ b/trunk/Documentation/spinlocks.txt @@ -86,7 +86,7 @@ to change the variables it has to get an exclusive write lock. The routines look the same as above: - rwlock_t xxx_lock = RW_LOCK_UNLOCKED; + rwlock_t xxx_lock = __RW_LOCK_UNLOCKED(xxx_lock); unsigned long flags; @@ -196,25 +196,3 @@ appropriate: For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or __SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate. - -SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. These interfere -with lockdep state tracking. - -Most of the time, you can simply turn: - static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED; -into: - static DEFINE_SPINLOCK(xxx_lock); - -Static structure member variables go from: - - struct foo bar { - .lock = SPIN_LOCK_UNLOCKED; - }; - -to: - - struct foo bar { - .lock = __SPIN_LOCK_UNLOCKED(bar.lock); - }; - -Declaration of static rw_locks undergo a similar transformation. diff --git a/trunk/include/linux/rwlock_types.h b/trunk/include/linux/rwlock_types.h index bd31808c7d8e..cc0072e93e36 100644 --- a/trunk/include/linux/rwlock_types.h +++ b/trunk/include/linux/rwlock_types.h @@ -43,14 +43,6 @@ typedef struct { RW_DEP_MAP_INIT(lockname) } #endif -/* - * RW_LOCK_UNLOCKED defeat lockdep state tracking and is hence - * deprecated. - * - * Please use DEFINE_RWLOCK() or __RW_LOCK_UNLOCKED() as appropriate. - */ -#define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init) - #define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x) #endif /* __LINUX_RWLOCK_TYPES_H */ diff --git a/trunk/include/linux/spinlock_types.h b/trunk/include/linux/spinlock_types.h index 851b7783720d..73548eb13a5d 100644 --- a/trunk/include/linux/spinlock_types.h +++ b/trunk/include/linux/spinlock_types.h @@ -81,14 +81,6 @@ typedef struct spinlock { #define __SPIN_LOCK_UNLOCKED(lockname) \ (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname) -/* - * SPIN_LOCK_UNLOCKED defeats lockdep state tracking and is hence - * deprecated. - * Please use DEFINE_SPINLOCK() or __SPIN_LOCK_UNLOCKED() as - * appropriate. - */ -#define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init) - #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) #include diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 4c0383da1c9a..58848e3e392c 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -2654,11 +2654,6 @@ sub process { WARN("Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr); } -# SPIN_LOCK_UNLOCKED & RW_LOCK_UNLOCKED are deprecated - if ($line =~ /\b(SPIN_LOCK_UNLOCKED|RW_LOCK_UNLOCKED)/) { - ERROR("Use of $1 is deprecated: see Documentation/spinlocks.txt\n" . $herecurr); - } - # warn about #if 0 if ($line =~ /^.\s*\#\s*if\s+0\b/) { CHK("if this code is redundant consider removing it\n" .