aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-04-09 15:31:13 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-05 10:03:42 -0400
commit33926eb7785ac7ce7d45d1ae5afb0780a4270342 (patch)
tree3b5952c1bc1a766e2ecd25e29b344a14a8f5268d /net/mac80211
parent95224fe83e5e78e042c96f2c43fa9092a3bc10ef (diff)
mac80211: mark local variable __maybe_unused
The 'local' variable in __ieee80211_vif_copy_chanctx_to_vlans() is only used/needed when lockdep is compiled in, mark it as such to avoid compile warnings in the other case. While at it, fix some indentation where it's used. Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/chan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index d8b1b8614842..3702d642cd8f 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -848,7 +848,7 @@ static void
848__ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata, 848__ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata,
849 bool clear) 849 bool clear)
850{ 850{
851 struct ieee80211_local *local = sdata->local; 851 struct ieee80211_local *local __maybe_unused = sdata->local;
852 struct ieee80211_sub_if_data *vlan; 852 struct ieee80211_sub_if_data *vlan;
853 struct ieee80211_chanctx_conf *conf; 853 struct ieee80211_chanctx_conf *conf;
854 854
@@ -864,7 +864,7 @@ __ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata,
864 * to a channel context that has already been freed. 864 * to a channel context that has already been freed.
865 */ 865 */
866 conf = rcu_dereference_protected(sdata->vif.chanctx_conf, 866 conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
867 lockdep_is_held(&local->chanctx_mtx)); 867 lockdep_is_held(&local->chanctx_mtx));
868 WARN_ON(!conf); 868 WARN_ON(!conf);
869 869
870 if (clear) 870 if (clear)