From: Arik Nemtsov <[email protected]>

On !CONFIG_SMP builds spin_is_locked always returns 0. Assert the
locking using assert_spin_locked, which is written to behave correctly
in all cases.

Signed-off-by: Arik Nemtsov <[email protected]>
Signed-off-by: Luciano Coelho <[email protected]>
(cherry picked from commit 8910cfa3ac022feebfe1c4ae021afc34a1c1af25)
---
 drivers/net/wireless/ti/wlcore/tx.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/tx.c 
b/drivers/net/wireless/ti/wlcore/tx.c
index ece392c..4573b53 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/etherdevice.h>
+#include <linux/spinlock.h>
 
 #include "wlcore.h"
 #include "debug.h"
@@ -1304,7 +1305,7 @@ bool wlcore_is_queue_stopped_by_reason_locked(struct 
wl1271 *wl,
 {
        int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue);
 
-       WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock));
+       assert_spin_locked(&wl->wl_lock);
        return test_bit(reason, &wl->queue_stop_reasons[hwq]);
 }
 
@@ -1313,6 +1314,6 @@ bool wlcore_is_queue_stopped_locked(struct wl1271 *wl, 
struct wl12xx_vif *wlvif,
 {
        int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue);
 
-       WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock));
+       assert_spin_locked(&wl->wl_lock);
        return !!wl->queue_stop_reasons[hwq];
 }
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to