Thread (5 messages) 5 messages, 3 authors, 2014-09-30

Re: [PATCH v2] zd1211rw: replace ZD_ASSERT with lockdep_assert_held()

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2014-09-11 10:12:35
Also in: lkml, netdev

On Thu, 2014-09-11 at 15:39 +0530, Sanjeev Sharma wrote:
on some architecture spin_is_locked() always return false in
uniprocessor configuration and therefore it would be advise
to replace with lockdep_assert_held().

Signed-off-by: Sanjeev Sharma <redacted>
---
Changes in v2:
  - corrected the typo
Now it compiles, but you got the logic wrong.
quoted hunk
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -235,7 +235,7 @@ void zd_mac_clear(struct zd_mac *mac)
 {
 	flush_workqueue(zd_workqueue);
 	zd_chip_clear(&mac->chip);
-	ZD_ASSERT(!spin_is_locked(&mac->lock));
+	lockdep_assert_held(&mac->lock);
 	ZD_MEMCLEAR(mac, sizeof(struct zd_mac));
 }
Look closely at this again.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help