* [PATCH] ath10k: remove set but not used variable 'num_tdls_vifs'
@ 2018-11-08 9:32 YueHaibing
[not found] ` <1541669570-110540-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-12-20 16:47 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-11-08 9:32 UTC (permalink / raw)
To: Kalle Valo; +Cc: YueHaibing, ath10k, linux-wireless, netdev, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_sta_state':
drivers/net/wireless/ath/ath10k/mac.c:6238:7: warning:
variable 'num_tdls_vifs' set but not used [-Wunused-but-set-variable]
'num_tdls_vifs' not used any more after
9a993cc1ea95 ("ath10k: fix the logic of limiting tdls peer counts")
Also, remove the single called function ath10k_mac_tdls_vifs_count
and ath10k_mac_tdls_vifs_count_iter.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index a1c2801..6006f7a 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5754,30 +5754,6 @@ static int ath10k_mac_tdls_vif_stations_count(struct ieee80211_hw *hw,
return data.num_tdls_stations;
}
-static void ath10k_mac_tdls_vifs_count_iter(void *data, u8 *mac,
- struct ieee80211_vif *vif)
-{
- struct ath10k_vif *arvif = (void *)vif->drv_priv;
- int *num_tdls_vifs = data;
-
- if (vif->type != NL80211_IFTYPE_STATION)
- return;
-
- if (ath10k_mac_tdls_vif_stations_count(arvif->ar->hw, vif) > 0)
- (*num_tdls_vifs)++;
-}
-
-static int ath10k_mac_tdls_vifs_count(struct ieee80211_hw *hw)
-{
- int num_tdls_vifs = 0;
-
- ieee80211_iterate_active_interfaces_atomic(hw,
- IEEE80211_IFACE_ITER_NORMAL,
- ath10k_mac_tdls_vifs_count_iter,
- &num_tdls_vifs);
- return num_tdls_vifs;
-}
-
static int ath10k_hw_scan(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_scan_request *hw_req)
@@ -6285,7 +6261,6 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
*/
enum wmi_peer_type peer_type = WMI_PEER_TYPE_DEFAULT;
u32 num_tdls_stations;
- u32 num_tdls_vifs;
ath10k_dbg(ar, ATH10K_DBG_MAC,
"mac vdev %d peer create %pM (new sta) sta %d / %d peer %d / %d\n",
@@ -6301,7 +6276,6 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
}
num_tdls_stations = ath10k_mac_tdls_vif_stations_count(hw, vif);
- num_tdls_vifs = ath10k_mac_tdls_vifs_count(hw);
if (sta->tdls) {
if (num_tdls_stations >= ar->max_num_tdls_vdevs) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: remove set but not used variable 'num_tdls_vifs'
[not found] ` <1541669570-110540-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2018-12-20 16:47 ` Kalle Valo
0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-12-20 16:47 UTC (permalink / raw)
To: YueHaibing
Cc: YueHaibing, ath10k-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
YueHaibing <yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_sta_state':
> drivers/net/wireless/ath/ath10k/mac.c:6238:7: warning:
> variable 'num_tdls_vifs' set but not used [-Wunused-but-set-variable]
>
> 'num_tdls_vifs' not used any more after
> 9a993cc1ea95 ("ath10k: fix the logic of limiting tdls peer counts")
>
> Also, remove the single called function ath10k_mac_tdls_vifs_count
> and ath10k_mac_tdls_vifs_count_iter.
>
> Signed-off-by: YueHaibing <yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Patch applied to ath-next branch of ath.git, thanks.
bff70e5f78e9 ath10k: remove set but not used variable 'num_tdls_vifs'
--
https://patchwork.kernel.org/patch/10673841/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: remove set but not used variable 'num_tdls_vifs'
2018-11-08 9:32 [PATCH] ath10k: remove set but not used variable 'num_tdls_vifs' YueHaibing
[not found] ` <1541669570-110540-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2018-12-20 16:47 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-12-20 16:47 UTC (permalink / raw)
To: YueHaibing; +Cc: linux-wireless, kernel-janitors, YueHaibing, ath10k, netdev
YueHaibing <yuehaibing@huawei.com> wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_sta_state':
> drivers/net/wireless/ath/ath10k/mac.c:6238:7: warning:
> variable 'num_tdls_vifs' set but not used [-Wunused-but-set-variable]
>
> 'num_tdls_vifs' not used any more after
> 9a993cc1ea95 ("ath10k: fix the logic of limiting tdls peer counts")
>
> Also, remove the single called function ath10k_mac_tdls_vifs_count
> and ath10k_mac_tdls_vifs_count_iter.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
bff70e5f78e9 ath10k: remove set but not used variable 'num_tdls_vifs'
--
https://patchwork.kernel.org/patch/10673841/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-20 16:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-08 9:32 [PATCH] ath10k: remove set but not used variable 'num_tdls_vifs' YueHaibing
[not found] ` <1541669570-110540-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-12-20 16:47 ` Kalle Valo
2018-12-20 16:47 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).