* [PATCH] ath9k: remove set but not used variable 'acq'
@ 2019-02-25 3:32 YueHaibing
2019-02-25 9:50 ` Toke Høiland-Jørgensen
2019-02-26 13:09 ` Kalle Valo
0 siblings, 2 replies; 7+ messages in thread
From: YueHaibing @ 2019-02-25 3:32 UTC (permalink / raw)
To: QCA ath9k Development, Kalle Valo
Cc: YueHaibing, linux-wireless, netdev, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/wireless/ath/ath9k/recv.c: In function 'ath_rx_count_airtime':
drivers/net/wireless/ath/ath9k/recv.c:1010:18: warning:
variable 'acq' set but not used [-Wunused-but-set-variable]
It's not used after 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling
and airtime APIs"). Also remove related variables.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/wireless/ath/ath9k/recv.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 285a62d3019d..4e97f7f3b2a3 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1006,9 +1006,6 @@ static void ath_rx_count_airtime(struct ath_softc *sc,
struct ath_rx_status *rs,
struct sk_buff *skb)
{
- struct ath_node *an;
- struct ath_acq *acq;
- struct ath_vif *avp;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
@@ -1019,7 +1016,7 @@ static void ath_rx_count_airtime(struct ath_softc *sc,
int phy;
u16 len = rs->rs_datalen;
u32 airtime = 0;
- u8 tidno, acno;
+ u8 tidno;
if (!ieee80211_is_data(hdr->frame_control))
return;
@@ -1029,11 +1026,7 @@ static void ath_rx_count_airtime(struct ath_softc *sc,
sta = ieee80211_find_sta_by_ifaddr(sc->hw, hdr->addr2, NULL);
if (!sta)
goto exit;
- an = (struct ath_node *) sta->drv_priv;
- avp = (struct ath_vif *) an->vif->drv_priv;
tidno = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
- acno = TID_TO_WME_AC(tidno);
- acq = &avp->chanctx->acq[acno];
rxs = IEEE80211_SKB_RXCB(skb);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ath9k: remove set but not used variable 'acq'
2019-02-25 3:32 [PATCH] ath9k: remove set but not used variable 'acq' YueHaibing
@ 2019-02-25 9:50 ` Toke Høiland-Jørgensen
2019-02-25 10:03 ` Kalle Valo
2019-02-26 13:09 ` Kalle Valo
1 sibling, 1 reply; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-02-25 9:50 UTC (permalink / raw)
To: YueHaibing, QCA ath9k Development, Kalle Valo
Cc: YueHaibing, linux-wireless, netdev, kernel-janitors
YueHaibing <yuehaibing@huawei.com> writes:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/ath/ath9k/recv.c: In function 'ath_rx_count_airtime':
> drivers/net/wireless/ath/ath9k/recv.c:1010:18: warning:
> variable 'acq' set but not used [-Wunused-but-set-variable]
>
> It's not used after 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling
> and airtime APIs"). Also remove related variables.
Ah, right, seems I forgot to clean that up. I wonder why I didn't get a
compiler warning for it. Anyway, nice catch :)
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Toke
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ath9k: remove set but not used variable 'acq'
2019-02-25 9:50 ` Toke Høiland-Jørgensen
@ 2019-02-25 10:03 ` Kalle Valo
2019-02-25 10:49 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2019-02-25 10:03 UTC (permalink / raw)
To: Toke Høiland-Jørgensen
Cc: YueHaibing, QCA ath9k Development, linux-wireless, netdev,
kernel-janitors
Toke Høiland-Jørgensen <toke@redhat.com> writes:
> YueHaibing <yuehaibing@huawei.com> writes:
>
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/net/wireless/ath/ath9k/recv.c: In function 'ath_rx_count_airtime':
>> drivers/net/wireless/ath/ath9k/recv.c:1010:18: warning:
>> variable 'acq' set but not used [-Wunused-but-set-variable]
>>
>> It's not used after 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling
>> and airtime APIs"). Also remove related variables.
>
> Ah, right, seems I forgot to clean that up. I wonder why I didn't get a
> compiler warning for it.
I think the warning is not enabled by default and you need to use W=1
Makefile variable to enable it.
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ath9k: remove set but not used variable 'acq'
2019-02-25 10:03 ` Kalle Valo
@ 2019-02-25 10:49 ` Toke Høiland-Jørgensen
2019-02-25 10:59 ` Kalle Valo
0 siblings, 1 reply; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-02-25 10:49 UTC (permalink / raw)
To: Kalle Valo
Cc: YueHaibing, QCA ath9k Development, linux-wireless, netdev,
kernel-janitors
Kalle Valo <kvalo@codeaurora.org> writes:
> Toke Høiland-Jørgensen <toke@redhat.com> writes:
>
>> YueHaibing <yuehaibing@huawei.com> writes:
>>
>>> Fixes gcc '-Wunused-but-set-variable' warning:
>>>
>>> drivers/net/wireless/ath/ath9k/recv.c: In function 'ath_rx_count_airtime':
>>> drivers/net/wireless/ath/ath9k/recv.c:1010:18: warning:
>>> variable 'acq' set but not used [-Wunused-but-set-variable]
>>>
>>> It's not used after 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling
>>> and airtime APIs"). Also remove related variables.
>>
>> Ah, right, seems I forgot to clean that up. I wonder why I didn't get a
>> compiler warning for it.
>
> I think the warning is not enabled by default and you need to use W=1
> Makefile variable to enable it.
Hmm, right, thanks! Guess I should get into the habit of compiling with
warnings enabled before submitting patches :)
-Toke
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ath9k: remove set but not used variable 'acq'
2019-02-25 10:49 ` Toke Høiland-Jørgensen
@ 2019-02-25 10:59 ` Kalle Valo
2019-02-25 11:04 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2019-02-25 10:59 UTC (permalink / raw)
To: Toke Høiland-Jørgensen
Cc: YueHaibing, QCA ath9k Development, linux-wireless, netdev,
kernel-janitors
Toke Høiland-Jørgensen <toke@redhat.com> writes:
> Kalle Valo <kvalo@codeaurora.org> writes:
>
>> Toke Høiland-Jørgensen <toke@redhat.com> writes:
>>
>>> YueHaibing <yuehaibing@huawei.com> writes:
>>>
>>>> Fixes gcc '-Wunused-but-set-variable' warning:
>>>>
>>>> drivers/net/wireless/ath/ath9k/recv.c: In function 'ath_rx_count_airtime':
>>>> drivers/net/wireless/ath/ath9k/recv.c:1010:18: warning:
>>>> variable 'acq' set but not used [-Wunused-but-set-variable]
>>>>
>>>> It's not used after 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling
>>>> and airtime APIs"). Also remove related variables.
>>>
>>> Ah, right, seems I forgot to clean that up. I wonder why I didn't get a
>>> compiler warning for it.
>>
>> I think the warning is not enabled by default and you need to use W=1
>> Makefile variable to enable it.
>
> Hmm, right, thanks! Guess I should get into the habit of compiling with
> warnings enabled before submitting patches :)
But you might get a lot of warnings and it could be difficult to find
new warnings from all the noise. In ath10k I just fixed all W=1 warnings
which I saw with gcc 8.1 and only now I was able to enable W=1 on my
build script.
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ath9k: remove set but not used variable 'acq'
2019-02-25 10:59 ` Kalle Valo
@ 2019-02-25 11:04 ` Toke Høiland-Jørgensen
0 siblings, 0 replies; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-02-25 11:04 UTC (permalink / raw)
To: Kalle Valo
Cc: YueHaibing, QCA ath9k Development, linux-wireless, netdev,
kernel-janitors
Kalle Valo <kvalo@codeaurora.org> writes:
> Toke Høiland-Jørgensen <toke@redhat.com> writes:
>
>> Kalle Valo <kvalo@codeaurora.org> writes:
>>
>>> Toke Høiland-Jørgensen <toke@redhat.com> writes:
>>>
>>>> YueHaibing <yuehaibing@huawei.com> writes:
>>>>
>>>>> Fixes gcc '-Wunused-but-set-variable' warning:
>>>>>
>>>>> drivers/net/wireless/ath/ath9k/recv.c: In function 'ath_rx_count_airtime':
>>>>> drivers/net/wireless/ath/ath9k/recv.c:1010:18: warning:
>>>>> variable 'acq' set but not used [-Wunused-but-set-variable]
>>>>>
>>>>> It's not used after 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling
>>>>> and airtime APIs"). Also remove related variables.
>>>>
>>>> Ah, right, seems I forgot to clean that up. I wonder why I didn't get a
>>>> compiler warning for it.
>>>
>>> I think the warning is not enabled by default and you need to use W=1
>>> Makefile variable to enable it.
>>
>> Hmm, right, thanks! Guess I should get into the habit of compiling with
>> warnings enabled before submitting patches :)
>
> But you might get a lot of warnings and it could be difficult to find
> new warnings from all the noise. In ath10k I just fixed all W=1 warnings
> which I saw with gcc 8.1 and only now I was able to enable W=1 on my
> build script.
Ah, that was what that patch series was about :)
Right, well, I guess I'll give it a shot at some point and if it's not
too annoying I'll try to keep an eye on the warnings output...
-Toke
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ath9k: remove set but not used variable 'acq'
2019-02-25 3:32 [PATCH] ath9k: remove set but not used variable 'acq' YueHaibing
2019-02-25 9:50 ` Toke Høiland-Jørgensen
@ 2019-02-26 13:09 ` Kalle Valo
1 sibling, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2019-02-26 13:09 UTC (permalink / raw)
To: YueHaibing
Cc: QCA ath9k Development, YueHaibing, linux-wireless, netdev,
kernel-janitors
YueHaibing <yuehaibing@huawei.com> wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/ath/ath9k/recv.c: In function 'ath_rx_count_airtime':
> drivers/net/wireless/ath/ath9k/recv.c:1010:18: warning:
> variable 'acq' set but not used [-Wunused-but-set-variable]
>
> It's not used after 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling
> and airtime APIs"). Also remove related variables.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
03af21d6ba35 ath9k: remove set but not used variable 'acq'
--
https://patchwork.kernel.org/patch/10828153/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-02-26 13:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 3:32 [PATCH] ath9k: remove set but not used variable 'acq' YueHaibing
2019-02-25 9:50 ` Toke Høiland-Jørgensen
2019-02-25 10:03 ` Kalle Valo
2019-02-25 10:49 ` Toke Høiland-Jørgensen
2019-02-25 10:59 ` Kalle Valo
2019-02-25 11:04 ` Toke Høiland-Jørgensen
2019-02-26 13:09 ` 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).