diff mbox series

[v2] rtlwifi: rtl8192se: Remove some unused variables

Message ID 20230301030534.2102-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [v2] rtlwifi: rtl8192se: Remove some unused variables | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Jiapeng Chong March 1, 2023, 3:05 a.m. UTC
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 <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
  -Remove bcn_cw and bcn_ifs.

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

Comments

Simon Horman March 1, 2023, 10:57 a.m. UTC | #1
On Wed, Mar 01, 2023 at 11:05:34AM +0800, Jiapeng Chong wrote:
> 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 <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Ping-Ke Shih March 2, 2023, 12:23 a.m. UTC | #2
> -----Original Message-----
> From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Sent: Wednesday, March 1, 2023 11:06 AM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jiapeng Chong
> <jiapeng.chong@linux.alibaba.com>; Abaci Robot <abaci@linux.alibaba.com>
> Subject: [PATCH v2] rtlwifi: rtl8192se: Remove some unused variables

Miss subject prefix "wifi: ".

> 
> 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 <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>


> ---
> Changes in v2:
>   -Remove bcn_cw and bcn_ifs.
> 
>  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
Ping-Ke Shih March 2, 2023, 12:27 a.m. UTC | #3
> -----Original Message-----
> From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Sent: Wednesday, March 1, 2023 11:06 AM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jiapeng Chong
> <jiapeng.chong@linux.alibaba.com>; Abaci Robot <abaci@linux.alibaba.com>
> Subject: [PATCH v2] rtlwifi: rtl8192se: Remove some unused variables

Miss subject prefix "wifi: ".

> 
> 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 <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>


> ---
> Changes in v2:
>   -Remove bcn_cw and bcn_ifs.
> 
>  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
diff mbox series

Patch

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);
 }