Skip to contentSkip to conversation

rtlwifi: rtl8192ee: remove static variable stop_report_cnt

PATCH In review Colin Ian King 3 participants 5 messages Oct 31, 2022 – Nov 4, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtlwifi: rtl8192ee: remove static variable stop_report_cnt

Variable stop_report_cnt is being set or incremented but is never being used for anything meaningful. The variable and code relating to it's use is redundant and can be removed.

---
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c +0 -8
index 8043d819fb85..a182cdeb58e2 100644
@@ -997,7 +997,6 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	u16 read_point, write_point;
 	bool ret = false;
-	static u8 stop_report_cnt;
 	struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
 
 	{
@@ -1038,13 +1037,6 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
 	    rtlpriv->psc.rfoff_reason > RF_CHANGE_BY_PS)
 		ret = true;
 
-	if (hw_queue < BEACON_QUEUE) {
-		if (!ret)
-			stop_report_cnt++;
-		else
-			stop_report_cnt = 0;
-	}
-
 	return ret;
 }
 
Signature · 1 line
2.37.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Colin Ian King <[email protected]>
Sent: Monday, October 31, 2022 11:57 PM
To: Ping-Ke Shih <[email protected]>; Kalle Valo <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] rtlwifi: rtl8192ee: remove static variable stop_report_cnt

Quoted 5 lines

Variable stop_report_cnt is being set or incremented but is never being used for anything meaningful. The variable and code relating to it's use is redundant and can be removed.

Quoted 36 lines
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c +0 -9
index 8043d819fb85..a182cdeb58e2 100644
@@ -997,7 +997,6 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	u16 read_point, write_point;
 	bool ret = false;
-	static u8 stop_report_cnt;
 	struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
 
 	{
@@ -1038,13 +1037,6 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
 	    rtlpriv->psc.rfoff_reason > RF_CHANGE_BY_PS)
 		ret = true;
 
-	if (hw_queue < BEACON_QUEUE) {
-		if (!ret)
-			stop_report_cnt++;
-		else
-			stop_report_cnt = 0;
-	}
-
 	return ret;
 }
 
--

2.37.3

------Please consider the environment before printing this e-mail.

maintainer
#2 lore raw
In reply to Colin Ian King
Quoted 19 lines

-----Original Message-----
From: Ping-Ke Shih
Sent: Tuesday, November 1, 2022 8:22 AM
To: 'Colin Ian King' <[email protected]>; Kalle Valo <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: [PATCH] rtlwifi: rtl8192ee: remove static variable stop_report_cnt

Quoted 8 lines

-----Original Message-----
From: Colin Ian King <[email protected]>
Sent: Monday, October 31, 2022 11:57 PM
To: Ping-Ke Shih <[email protected]>; Kalle Valo <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] rtlwifi: rtl8192ee: remove static variable stop_report_cnt

Subject prefix should be "wifi: rtlwifi: ..."

I'm not sure if Kalle can help this, or you can send v2 to add prefix.

Quoted 45 lines
Quoted 6 lines

Variable stop_report_cnt is being set or incremented but is never being used for anything meaningful. The variable and code relating to it's use is redundant and can be removed.

Quoted 36 lines
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c +0 -9
index 8043d819fb85..a182cdeb58e2 100644
@@ -997,7 +997,6 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	u16 read_point, write_point;
 	bool ret = false;
-	static u8 stop_report_cnt;
 	struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
 
 	{
@@ -1038,13 +1037,6 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
 	    rtlpriv->psc.rfoff_reason > RF_CHANGE_BY_PS)
 		ret = true;
 
-	if (hw_queue < BEACON_QUEUE) {
-		if (!ret)
-			stop_report_cnt++;
-		else
-			stop_report_cnt = 0;
-	}
-
 	return ret;
 }
 
--

2.37.3

------Please consider the environment before printing this e-mail.

#3 lore raw
Quoted 23 lines · Ping-Ke Shih
Quoted 22 lines

-----Original Message-----
From: Ping-Ke Shih
Sent: Tuesday, November 1, 2022 8:22 AM
To: 'Colin Ian King' <[email protected]>; Kalle Valo <[email protected]>; David S . Miller
<[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
<[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: [PATCH] rtlwifi: rtl8192ee: remove static variable stop_report_cnt

Quoted 10 lines

-----Original Message-----
From: Colin Ian King <[email protected]>
Sent: Monday, October 31, 2022 11:57 PM
To: Ping-Ke Shih <[email protected]>; Kalle Valo <[email protected]>; David S . Miller
<[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
<[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] rtlwifi: rtl8192ee: remove static variable stop_report_cnt

Quoted 3 lines

Subject prefix should be "wifi: rtlwifi: ..."

I'm not sure if Kalle can help this, or you can send v2 to add prefix.

Yeah, I can fix that during commit.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#4 lore raw

Re: wifi: rtlwifi: rtl8192ee: remove static variable stop_report_cnt

In reply to Colin Ian King
Quoted 6 lines · Colin Ian King

Variable stop_report_cnt is being set or incremented but is never being used for anything meaningful. The variable and code relating to it's use is redundant and can be removed.

Patch applied to wireless-next.git, thanks.

cdeee8540952 wifi: rtlwifi: rtl8192ee: remove static variable stop_report_cnt

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

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