fix shadow warnings
Subsystems (2)
Johannes Berg
maintainercover fix shadow warnings
Since the variables are useless ... it looks
like -Wshadow is no longer default though.
johannes
Johannes Berg
maintainerPATCH 1/2 mac80211: fix a few -Wshadow warnings
From: Johannes Berg <[email protected]>
It seems that -Wshadow is no longer default in
sparse runs, but let's fix the warnings anyway.
Signed-off-by Johannes Berg <[email protected]>
--- net/mac80211/rx.c | 3 --- net/mac80211/status.c | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-)
net/mac80211/rx.c +0 -3
@@ -2180,9 +2180,6 @@ ieee80211_rx_h_mgmt_check(struct ieee802if (rx->sdata->vif.type ==NL80211_IFTYPE_AP &&ieee80211_is_beacon (mgmt->frame_control) && !(rx->flags &IEEE80211_RX_BEACON_REPORTED )) { -struct ieee80211_rx_status *status; - - status =IEEE80211_SKB_RXCB (rx->skb);cfg80211_report_obss_beacon (rx->local->hw.wiphy, rx->skb->data, rx->skb->len, status->freq,GFP_ATOMIC );
net/mac80211/status.c +3 -3
@@ -350,7 +350,6 @@ void ieee80211_tx_status(struct ieee8021bool send_to_cooked;bool acked;struct ieee80211_bar *bar; -u16 tid;int rtap_len;for (i =0 ; i <IEEE80211_TX_MAX_RATES ; i++) {
@@ -412,7 +411,7 @@ void ieee80211_tx_status(struct ieee8021 }if (!acked &&ieee80211_is_back_req (fc)) { -u16 control; +u16 tid, control;/* * BAR failed, store the last SSN and retry sending
@@ -516,7 +515,8 @@ void ieee80211_tx_status(struct ieee8021if (ieee80211_is_nullfunc (hdr->frame_control) ||ieee80211_is_qos_nullfunc (hdr->frame_control)) { -bool acked = info->flags &IEEE80211_TX_STAT_ACK ; + acked = info->flags &IEEE80211_TX_STAT_ACK ; +cfg80211_probe_status (skb->dev, hdr->addr1, cookie, acked,GFP_ATOMIC ); }else {
Johannes Berg
maintainerPATCH 2/2 cfg80211: fix a few -Wshadow warnings
In reply to Johannes BergFrom: Johannes Berg <[email protected]>
It seems that -Wshadow is no longer default in
sparse runs, but let's fix the warnings anyway.
Signed-off-by Johannes Berg <[email protected]>
--- net/wireless/nl80211.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
net/wireless/nl80211.c +3 -5
@@ -427,10 +427,9 @@ static int nl80211_parse_key_new(structif (tb[NL80211_KEY_DEFAULT_TYPES ]) {struct nlattr *kdt[NUM_NL80211_KEY_DEFAULT_TYPES ]; -int err =nla_parse_nested (kdt, -NUM_NL80211_KEY_DEFAULT_TYPES -1 , - tb[NL80211_KEY_DEFAULT_TYPES ], - nl80211_key_default_policy); + err =nla_parse_nested (kdt,NUM_NL80211_KEY_DEFAULT_TYPES -1 , + tb[NL80211_KEY_DEFAULT_TYPES ], + nl80211_key_default_policy);if (err)return err;
@@ -4781,7 +4780,6 @@ static int nl80211_join_ibss(struct sk_bnla_len (info->attrs[NL80211_ATTR_BSS_BASIC_RATES ]);struct ieee80211_supported_band *sband = wiphy->bands[ibss.channel->band]; -int err; err =ieee80211_get_ratemask (sband, rates, n_rates, &ibss.basic_rates);