2023-02-17 09:25:51

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] rtlwifi: rtl8192de: Remove the unused variable bcnfunc_enable

Variable bcnfunc_enable is not effectively used, so delete it.

drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:1050:5: warning: variable 'bcnfunc_enable' set but not used.

Reported-by: Abaci Robot <[email protected]>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4110
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
index 2aecb2583f75..df1e36fbc348 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
@@ -1047,7 +1047,6 @@ static int _rtl92de_set_media_status(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw);
u8 bt_msr = rtl_read_byte(rtlpriv, MSR);
enum led_ctl_mode ledaction = LED_CTL_NO_LINK;
- u8 bcnfunc_enable;

bt_msr &= 0xfc;

@@ -1064,31 +1063,26 @@ static int _rtl92de_set_media_status(struct ieee80211_hw *hw,
"Set HW_VAR_MEDIA_STATUS: No such media status(%x)\n",
type);
}
- bcnfunc_enable = rtl_read_byte(rtlpriv, REG_BCN_CTRL);
switch (type) {
case NL80211_IFTYPE_UNSPECIFIED:
bt_msr |= MSR_NOLINK;
ledaction = LED_CTL_LINK;
- bcnfunc_enable &= 0xF7;
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to NO LINK!\n");
break;
case NL80211_IFTYPE_ADHOC:
bt_msr |= MSR_ADHOC;
- bcnfunc_enable |= 0x08;
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to Ad Hoc!\n");
break;
case NL80211_IFTYPE_STATION:
bt_msr |= MSR_INFRA;
ledaction = LED_CTL_LINK;
- bcnfunc_enable &= 0xF7;
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to STA!\n");
break;
case NL80211_IFTYPE_AP:
bt_msr |= MSR_AP;
- bcnfunc_enable |= 0x08;
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"Set Network type to AP!\n");
break;
--
2.20.1.7.g153144c



2023-02-20 09:17:58

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH] rtlwifi: rtl8192de: Remove the unused variable bcnfunc_enable



> -----Original Message-----
> From: Jiapeng Chong <[email protected]>
> Sent: Friday, February 17, 2023 5:25 PM
> To: Ping-Ke Shih <[email protected]>
> Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; Jiapeng Chong
> <[email protected]>; Abaci Robot <[email protected]>
> Subject: [PATCH] rtlwifi: rtl8192de: Remove the unused variable bcnfunc_enable
>
> Variable bcnfunc_enable is not effectively used, so delete it.
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:1050:5: warning: variable 'bcnfunc_enable' set but
> not used.
>
> Reported-by: Abaci Robot <[email protected]>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4110
> Signed-off-by: Jiapeng Chong <[email protected]>

Acked-by: Ping-Ke Shih <[email protected]>

[...]


2023-02-22 12:30:39

by Kalle Valo

[permalink] [raw]
Subject: Re: wifi: rtlwifi: rtl8192de: Remove the unused variable bcnfunc_enable

Jiapeng Chong <[email protected]> wrote:

> Variable bcnfunc_enable is not effectively used, so delete it.
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:1050:5: warning: variable 'bcnfunc_enable' set but not used.
>
> Reported-by: Abaci Robot <[email protected]>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4110
> Signed-off-by: Jiapeng Chong <[email protected]>
> Acked-by: Ping-Ke Shih <[email protected]>

Patch applied to wireless-next.git, thanks.

db5e4b364553 wifi: rtlwifi: rtl8192de: Remove the unused variable bcnfunc_enable

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches