netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:core/rcu] smsc: Replace spin_is_locked() with lockdep
@ 2018-12-04 22:34 tip-bot for Lance Roy
  0 siblings, 0 replies; only message in thread
From: tip-bot for Lance Roy @ 2018-12-04 22:34 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, paulmck, hpa, netdev, steve.glendinning, ldr709, davem,
	mingo

Commit-ID:  97eeebea894283c290ead6694b76f575e7654773
Gitweb:     https://git.kernel.org/tip/97eeebea894283c290ead6694b76f575e7654773
Author:     Lance Roy <ldr709@gmail.com>
AuthorDate: Thu, 4 Oct 2018 23:45:42 -0700
Committer:  Paul E. McKenney <paulmck@linux.ibm.com>
CommitDate: Mon, 12 Nov 2018 09:06:22 -0800

smsc: Replace spin_is_locked() with lockdep

lockdep_assert_held() is better suited to checking locking requirements,
since it only checks if the current thread holds the lock regardless of
whether someone else does. This is also a step towards possibly removing
spin_is_locked().

Signed-off-by: Lance Roy <ldr709@gmail.com>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
---
 drivers/net/ethernet/smsc/smsc911x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/smsc/smsc911x.h b/drivers/net/ethernet/smsc/smsc911x.h
index 8d75508acd2b..51b2fc1a395f 100644
--- a/drivers/net/ethernet/smsc/smsc911x.h
+++ b/drivers/net/ethernet/smsc/smsc911x.h
@@ -67,7 +67,7 @@
 
 #ifdef CONFIG_DEBUG_SPINLOCK
 #define SMSC_ASSERT_MAC_LOCK(pdata) \
-		WARN_ON_SMP(!spin_is_locked(&pdata->mac_lock))
+		lockdep_assert_held(&pdata->mac_lock)
 #else
 #define SMSC_ASSERT_MAC_LOCK(pdata) do {} while (0)
 #endif				/* CONFIG_DEBUG_SPINLOCK */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-04 22:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-04 22:34 [tip:core/rcu] smsc: Replace spin_is_locked() with lockdep tip-bot for Lance Roy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).