Commit 191d6a11 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

ath9k: fix sparse complaint on aphy for debugfs

This fixes this sparse complaint:

  CHECK   drivers/net/wireless/ath/ath9k/debug.c
drivers/net/wireless/ath/ath9k/debug.c:548:34: warning: symbol 'aphy' shadows an earlier one
drivers/net/wireless/ath/ath9k/debug.c:491:26: originally declared here
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 744bcb42
...@@ -461,16 +461,16 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf, ...@@ -461,16 +461,16 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
/* Put variable-length stuff down here, and check for overflows. */ /* Put variable-length stuff down here, and check for overflows. */
for (i = 0; i < sc->num_sec_wiphy; i++) { for (i = 0; i < sc->num_sec_wiphy; i++) {
struct ath_wiphy *aphy = sc->sec_wiphy[i]; struct ath_wiphy *aphy_tmp = sc->sec_wiphy[i];
if (aphy == NULL) if (aphy_tmp == NULL)
continue; continue;
chan = aphy->hw->conf.channel; chan = aphy_tmp->hw->conf.channel;
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"secondary: %s (%s chan=%d ht=%d)\n", "secondary: %s (%s chan=%d ht=%d)\n",
wiphy_name(aphy->hw->wiphy), wiphy_name(aphy_tmp->hw->wiphy),
ath_wiphy_state_str(aphy->state), ath_wiphy_state_str(aphy_tmp->state),
ieee80211_frequency_to_channel(chan->center_freq), ieee80211_frequency_to_channel(chan->center_freq),
aphy->chan_is_ht); aphy_tmp->chan_is_ht);
} }
if (len > sizeof(buf)) if (len > sizeof(buf))
len = sizeof(buf); len = sizeof(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment