From: Arik Nemtsov Date: Tue, 12 Mar 2013 15:19:40 +0000 (+0200) Subject: wlcore: change warn on missing lock in wlcore_queue_xx funcs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8910cfa3ac022feebfe1c4ae021afc34a1c1af25;p=linux-beck.git wlcore: change warn on missing lock in wlcore_queue_xx funcs 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 Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 859955649c97..e0d9504c9ef7 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "wlcore.h" #include "debug.h" @@ -1289,7 +1290,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]); } @@ -1298,6 +1299,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]; }