]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
locking/spinlocks: Clean up comment and #ifndef for {,queued_}spin_is_locked()
authorAndrea Parri <andrea.parri@amarulasolutions.com>
Mon, 14 May 2018 23:01:29 +0000 (16:01 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 15 May 2018 06:11:15 +0000 (08:11 +0200)
Removes "#ifndef queued_spin_is_locked" from the generic code: this is
unused and it's reasonable to conclude that it will continue to be unused.

Also removes the comment about spin_is_locked() from mutex_is_locked():
the comment remains valid but not particularly useful.

Suggested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akiyks@gmail.com
Cc: boqun.feng@gmail.com
Cc: dhowells@redhat.com
Cc: j.alglave@ucl.ac.uk
Cc: linux-arch@vger.kernel.org
Cc: luc.maranget@inria.fr
Cc: npiggin@gmail.com
Cc: parri.andrea@gmail.com
Cc: stern@rowland.harvard.edu
Link: http://lkml.kernel.org/r/1526338889-7003-3-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/asm-generic/qspinlock.h
include/linux/mutex.h

index a8ed0a352d75c493ce0fdac4a732878fbef710af..9cc457597ddf845d73f48a1be3d10c9a248ba0e6 100644 (file)
@@ -26,7 +26,6 @@
  * @lock: Pointer to queued spinlock structure
  * Return: 1 if it is locked, 0 otherwise
  */
-#ifndef queued_spin_is_locked
 static __always_inline int queued_spin_is_locked(struct qspinlock *lock)
 {
        /*
@@ -35,7 +34,6 @@ static __always_inline int queued_spin_is_locked(struct qspinlock *lock)
         */
        return atomic_read(&lock->val);
 }
-#endif
 
 /**
  * queued_spin_value_unlocked - is the spinlock structure unlocked?
index 14bc0d5d0ee59b9102fc4381a893a327b59b2a8e..3093dd16242437612913e4100ee8873b1905666e 100644 (file)
@@ -146,9 +146,6 @@ extern void __mutex_init(struct mutex *lock, const char *name,
  */
 static inline bool mutex_is_locked(struct mutex *lock)
 {
-       /*
-        * XXX think about spin_is_locked
-        */
        return __mutex_owner(lock) != NULL;
 }