* [PATCH] rtl8xxxu: Remove set but not used variable 'rsr'
@ 2019-11-10 10:49 Zheng Yongjun
2019-11-12 2:28 ` Chris Chiu
2019-11-15 12:24 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2019-11-10 10:49 UTC (permalink / raw)
To: Jes.Sorensen, kvalo, davem, linux-wireless
Cc: linux-kernel, zhengyongjun3, Hulk Robot
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function rtl8xxxu_gen2_config_channel:
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:1266:13: warning: variable rsr set but not used [-Wunused-but-set-variable]
rsr is never used, so remove it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index c6c41fb962ff..2c1ca4bc4e56 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -1255,7 +1255,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)
void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
{
struct rtl8xxxu_priv *priv = hw->priv;
- u32 val32, rsr;
+ u32 val32;
u8 val8, subchannel;
u16 rf_mode_bw;
bool ht = true;
@@ -1264,7 +1264,6 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
rf_mode_bw = rtl8xxxu_read16(priv, REG_WMAC_TRXPTCL_CTL);
rf_mode_bw &= ~WMAC_TRXPTCL_CTL_BW_MASK;
- rsr = rtl8xxxu_read32(priv, REG_RESPONSE_RATE_SET);
channel = hw->conf.chandef.chan->hw_value;
/* Hack */
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtl8xxxu: Remove set but not used variable 'rsr'
2019-11-10 10:49 [PATCH] rtl8xxxu: Remove set but not used variable 'rsr' Zheng Yongjun
@ 2019-11-12 2:28 ` Chris Chiu
2019-11-15 12:24 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Chris Chiu @ 2019-11-12 2:28 UTC (permalink / raw)
To: Zheng Yongjun
Cc: Jes Sorensen, Kalle Valo, David Miller, linux-wireless,
Linux Kernel, Hulk Robot
On Sun, Nov 10, 2019 at 6:51 PM Zheng Yongjun <zhengyongjun3@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function rtl8xxxu_gen2_config_channel:
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:1266:13: warning: variable rsr set but not used [-Wunused-but-set-variable]
>
> rsr is never used, so remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Since the rtl8xxxu_gen2_config_channel is only invoked for 8723BU. I
verified the hal/rtl8723b_phycfg.c of RTL8723BU vendor driver. The RSR
register is also left intact. This commit looks good to me.
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index c6c41fb962ff..2c1ca4bc4e56 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -1255,7 +1255,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)
> void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
> {
> struct rtl8xxxu_priv *priv = hw->priv;
> - u32 val32, rsr;
> + u32 val32;
> u8 val8, subchannel;
> u16 rf_mode_bw;
> bool ht = true;
> @@ -1264,7 +1264,6 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
>
> rf_mode_bw = rtl8xxxu_read16(priv, REG_WMAC_TRXPTCL_CTL);
> rf_mode_bw &= ~WMAC_TRXPTCL_CTL_BW_MASK;
> - rsr = rtl8xxxu_read32(priv, REG_RESPONSE_RATE_SET);
> channel = hw->conf.chandef.chan->hw_value;
>
> /* Hack */
> --
> 2.23.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rtl8xxxu: Remove set but not used variable 'rsr'
2019-11-10 10:49 [PATCH] rtl8xxxu: Remove set but not used variable 'rsr' Zheng Yongjun
2019-11-12 2:28 ` Chris Chiu
@ 2019-11-15 12:24 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2019-11-15 12:24 UTC (permalink / raw)
To: Zheng Yongjun
Cc: Jes.Sorensen, davem, linux-wireless, linux-kernel, zhengyongjun3,
Hulk Robot
Zheng Yongjun <zhengyongjun3@huawei.com> wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function rtl8xxxu_gen2_config_channel:
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:1266:13: warning: variable rsr set but not used [-Wunused-but-set-variable]
>
> rsr is never used, so remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> Reviewed-by: Chris Chiu <chiu@endlessm.com>
Patch applied to wireless-drivers-next.git, thanks.
38860bdf28b7 rtl8xxxu: Remove set but not used variable 'rsr'
--
https://patchwork.kernel.org/patch/11236191/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-15 12:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-10 10:49 [PATCH] rtl8xxxu: Remove set but not used variable 'rsr' Zheng Yongjun
2019-11-12 2:28 ` Chris Chiu
2019-11-15 12:24 ` 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).