2023-03-02 02:39:33

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH v4] wifi: rtlwifi: rtl8192se: Remove some unused variables

Variable bcntime_cfg, bcn_cw and bcn_ifs are not effectively used, so
delete it.

drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1555:6: warning: variable 'bcntime_cfg' set but not used.

Reported-by: Abaci Robot <[email protected]>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240
Signed-off-by: Jiapeng Chong <[email protected]>
---
Changes in v4:
-Change the subject.

drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
index bd0b7e365edb..a8b5bf45b1bb 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
@@ -1552,8 +1552,6 @@ void rtl92se_set_beacon_related_registers(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
- u16 bcntime_cfg = 0;
- u16 bcn_cw = 6, bcn_ifs = 0xf;
u16 atim_window = 2;

/* ATIM Window (in unit of TU). */
@@ -1576,13 +1574,6 @@ void rtl92se_set_beacon_related_registers(struct ieee80211_hw *hw)
* other ad hoc STA */
rtl_write_byte(rtlpriv, BCN_ERR_THRESH, 100);

- /* Beacon Time Configuration */
- if (mac->opmode == NL80211_IFTYPE_ADHOC)
- bcntime_cfg |= (bcn_cw << BCN_TCFG_CW_SHIFT);
-
- /* TODO: bcn_ifs may required to be changed on ASIC */
- bcntime_cfg |= bcn_ifs << BCN_TCFG_IFS;
-
/*for beacon changed */
rtl92s_phy_set_beacon_hwreg(hw, mac->beacon_interval);
}
--
2.20.1.7.g153144c



2023-03-02 02:44:35

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH v4] wifi: rtlwifi: rtl8192se: Remove some unused variables



> -----Original Message-----
> From: Jiapeng Chong <[email protected]>
> Sent: Thursday, March 2, 2023 10:39 AM
> 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 v4] wifi: rtlwifi: rtl8192se: Remove some unused variables
>
> Variable bcntime_cfg, bcn_cw and bcn_ifs are not effectively used, so
> delete it.
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1555:6: warning: variable 'bcntime_cfg' set but not
> used.
>
> Reported-by: Abaci Robot <[email protected]>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240
> Signed-off-by: Jiapeng Chong <[email protected]>

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


> ---
> Changes in v4:
> -Change the subject.
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
> index bd0b7e365edb..a8b5bf45b1bb 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
> @@ -1552,8 +1552,6 @@ void rtl92se_set_beacon_related_registers(struct ieee80211_hw *hw)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
> - u16 bcntime_cfg = 0;
> - u16 bcn_cw = 6, bcn_ifs = 0xf;
> u16 atim_window = 2;
>
> /* ATIM Window (in unit of TU). */
> @@ -1576,13 +1574,6 @@ void rtl92se_set_beacon_related_registers(struct ieee80211_hw *hw)
> * other ad hoc STA */
> rtl_write_byte(rtlpriv, BCN_ERR_THRESH, 100);
>
> - /* Beacon Time Configuration */
> - if (mac->opmode == NL80211_IFTYPE_ADHOC)
> - bcntime_cfg |= (bcn_cw << BCN_TCFG_CW_SHIFT);
> -
> - /* TODO: bcn_ifs may required to be changed on ASIC */
> - bcntime_cfg |= bcn_ifs << BCN_TCFG_IFS;
> -
> /*for beacon changed */
> rtl92s_phy_set_beacon_hwreg(hw, mac->beacon_interval);
> }
> --
> 2.20.1.7.g153144c


2023-03-02 06:05:24

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v4] wifi: rtlwifi: rtl8192se: Remove some unused variables

Jiapeng Chong <[email protected]> writes:

> Variable bcntime_cfg, bcn_cw and bcn_ifs are not effectively used, so
> delete it.

I'll do s/it/them/ during commit, no need to resend because of this.

--
https://patchwork.kernel.org/project/linux-wireless/list/

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

2023-03-06 10:11:32

by Kalle Valo

[permalink] [raw]
Subject: Re: [v4] wifi: rtlwifi: rtl8192se: Remove some unused variables

Jiapeng Chong <[email protected]> wrote:

> Variables bcntime_cfg, bcn_cw and bcn_ifs are not effectively used, so
> delete them.
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1555:6: warning: variable 'bcntime_cfg' set but not used.
>
> Reported-by: Abaci Robot <[email protected]>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240
> Signed-off-by: Jiapeng Chong <[email protected]>
> Acked-by: Ping-Ke Shih <[email protected]>

Patch applied to wireless-next.git, thanks.

ff6f38eb920b wifi: rtlwifi: rtl8192se: Remove some unused variables

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

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