From: Luciano Coelho <luciano.coelho@xxxxxxxxx> After commit 5bcae31d9 (mac80211: implement multi-vif in-place reservations) we get a warning when CONFIG_LOCKDEP is not enabled: net/mac80211/chan.c: In function 'ieee80211_vif_get_chanctx': net/mac80211/chan.c:69:26: warning: unused variable 'local' [-Wunused-variable] struct ieee80211_local *local = sdata->local; ^ Fix this by removing the separate declaration for local and accessing it directly in the lockdep_is_held() call. Signed-off-by: Luciano Coelho <luciano.coelho@xxxxxxxxx> --- net/mac80211/chan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index c3fd4d2..0cdac4b 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -66,11 +66,10 @@ static bool ieee80211_can_create_new_chanctx(struct ieee80211_local *local) static struct ieee80211_chanctx * ieee80211_vif_get_chanctx(struct ieee80211_sub_if_data *sdata) { - struct ieee80211_local *local = sdata->local; struct ieee80211_chanctx_conf *conf; conf = rcu_dereference_protected(sdata->vif.chanctx_conf, - lockdep_is_held(&local->chanctx_mtx)); + lockdep_is_held(&sdata->local->chanctx_mtx)); if (!conf) return NULL; -- 2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html