]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mac80211: Remove unused 'sband' and 'local' variables
authorKirtika Ruchandani <kirtika.ruchandani@gmail.com>
Thu, 24 Nov 2016 04:46:14 +0000 (20:46 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 13 Dec 2016 15:05:09 +0000 (16:05 +0100)
Commit b1bce14a7954 (mac80211: update opmode when adding new station)
refactored ieee80211_vht_handle_opmode into __ieee80211_vht_handle_opmode
and ieee80211_vht_handle_opmode leaving a set but unused variable
(sband) in the former. Compiling with W=1 gives the following warning,
fix it.

net/mac80211/vht.c: In function ‘__ieee80211_vht_handle_opmode’:
net/mac80211/vht.c:424:35: warning: variable ‘sband’ set but not used [-Wunused-but-set-variable]

Remove 'struct ieee80211_local* local' as well, it was only used to
set sband.

This is a harmless warning, and is only being fixed to reduce the
noise with W=1 in the kernel.

Fixes: b1bce14a7954 ("mac80211: update opmode when adding new station")
Cc: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/vht.c

index 6832bf6ab69fe012ea4eeb3c02b79523083cdc58..d5a56e039106c2fd7073fcffd74d93bbbbc033e7 100644 (file)
@@ -436,14 +436,10 @@ u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
                                  struct sta_info *sta, u8 opmode,
                                  enum nl80211_band band)
 {
-       struct ieee80211_local *local = sdata->local;
-       struct ieee80211_supported_band *sband;
        enum ieee80211_sta_rx_bandwidth new_bw;
        u32 changed = 0;
        u8 nss;
 
-       sband = local->hw.wiphy->bands[band];
-
        /* ignore - no support for BF yet */
        if (opmode & IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF)
                return 0;