* [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats
@ 2023-01-25 20:08 Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 01/11] staging: rtl8192e: Remove unused variables rxrdu and rxok Philipp Hortmann
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove unused variables from struct rt_stats.
Tested with rtl8192e
Transferred this patch over wlan connection of rtl8192e
---
V1-V2: Removed further unused variable preamble_guardinterval from
"Remove unused variables numpacket.. and received_pre.."
Removed further unused variables prxsc and rxsc_sgien_exflg
from "Remove unused variables num_proc.., recei.. and rxov.."
Philipp Hortmann (11):
staging: rtl8192e: Remove unused variables rxrdu and rxok
staging: rtl8192e: Remove unused variables rxdatacrcerr and
rxmgmtcrcerr
staging: rtl8192e: Remove unused variables rxcrcerrmin and friends
staging: rtl8192e: Remove unused variables numpacket.. and
received_pre..
staging: rtl8192e: Remove unused variables numqry_..
staging: rtl8192e: Remove unused variables num_proc.., recei.. and
rxov..
staging: rtl8192e: Remove unused variables rxint, ints and shints
staging: rtl8192e: Remove unused variables txov.., txbeokint and
txbkokint
staging: rtl8192e: Remove unused variables txviok.., txvook.. and
txbea..
staging: rtl8192e: Remove unused variables txbeac.., txman.. and
txcmdp..
staging: rtl8192e: Remove unused variables txbytes.., txbyt.. and
signa..
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 39 +---------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 44 ++-----------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 31 -------------
3 files changed, 5 insertions(+), 109 deletions(-)
--
2.39.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 01/11] staging: rtl8192e: Remove unused variables rxrdu and rxok
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
@ 2023-01-25 20:08 ` Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 02/11] staging: rtl8192e: Remove unused variables rxdatacrcerr and rxmgmtcrcerr Philipp Hortmann
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rxrdu and rxok are initialized and increased but never read. Remove dead
code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 80450d46191c..605146c840c7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1938,7 +1938,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
if (!rtllib_rx(priv->rtllib, skb, &stats)) {
dev_kfree_skb_any(skb);
} else {
- priv->stats.rxok++;
if (unicast_packet)
priv->stats.rxbytesunicast += skb_len;
}
@@ -2186,7 +2185,6 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
tasklet_schedule(&priv->irq_prepare_beacon_tasklet);
if (inta & IMR_RDU) {
- priv->stats.rxrdu++;
rtl92e_writel(dev, INTA_MASK,
rtl92e_readl(dev, INTA_MASK) & ~IMR_RDU);
tasklet_schedule(&priv->irq_rx_tasklet);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 983bc663a570..82cbc7f5536a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -183,8 +183,6 @@ enum reset_type {
};
struct rt_stats {
- unsigned long rxrdu;
- unsigned long rxok;
unsigned long rxdatacrcerr;
unsigned long rxmgmtcrcerr;
unsigned long rxcrcerrmin;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 02/11] staging: rtl8192e: Remove unused variables rxdatacrcerr and rxmgmtcrcerr
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 01/11] staging: rtl8192e: Remove unused variables rxrdu and rxok Philipp Hortmann
@ 2023-01-25 20:08 ` Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 03/11] staging: rtl8192e: Remove unused variables rxcrcerrmin and friends Philipp Hortmann
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rxdatacrcerr and rxmgmtcrcerr are initialized and increased but never
read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 -------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
2 files changed, 9 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 605146c840c7..e0d0f4faeca7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1926,13 +1926,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
priv->rtllib->LedControlHandler(dev,
LED_CTL_RX);
- if (stats.bCRC) {
- if (type != RTLLIB_FTYPE_MGMT)
- priv->stats.rxdatacrcerr++;
- else
- priv->stats.rxmgmtcrcerr++;
- }
-
skb_len = skb->len;
if (!rtllib_rx(priv->rtllib, skb, &stats)) {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 82cbc7f5536a..f91a6f7a4e0a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -183,8 +183,6 @@ enum reset_type {
};
struct rt_stats {
- unsigned long rxdatacrcerr;
- unsigned long rxmgmtcrcerr;
unsigned long rxcrcerrmin;
unsigned long rxcrcerrmid;
unsigned long rxcrcerrmax;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 03/11] staging: rtl8192e: Remove unused variables rxcrcerrmin and friends
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 01/11] staging: rtl8192e: Remove unused variables rxrdu and rxok Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 02/11] staging: rtl8192e: Remove unused variables rxdatacrcerr and rxmgmtcrcerr Philipp Hortmann
@ 2023-01-25 20:08 ` Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre Philipp Hortmann
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rxcrcerrmin, rxcrcerrmax and rxcrcerrmid are initialized and increased
but never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 ----------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 13 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 9260d308e68b..e9273dfb638e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1812,7 +1812,6 @@ static void _rtl92e_update_received_rate_histogram_stats(
bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
struct rx_desc *pdesc, struct sk_buff *skb)
{
- struct r8192_priv *priv = rtllib_priv(dev);
struct rx_fwinfo *pDrvInfo = NULL;
stats->bICV = pdesc->ICV;
@@ -1825,15 +1824,6 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
if (stats->bHwError) {
stats->bShift = false;
-
- if (pdesc->CRC32) {
- if (pdesc->Length < 500)
- priv->stats.rxcrcerrmin++;
- else if (pdesc->Length > 1000)
- priv->stats.rxcrcerrmax++;
- else
- priv->stats.rxcrcerrmid++;
- }
return false;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index f91a6f7a4e0a..167c4aeea44e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -183,9 +183,6 @@ enum reset_type {
};
struct rt_stats {
- unsigned long rxcrcerrmin;
- unsigned long rxcrcerrmid;
- unsigned long rxcrcerrmax;
unsigned long received_rate_histogram[4][32];
unsigned long received_preamble_GI[2][32];
unsigned long numpacket_matchbssid;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre..
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (2 preceding siblings ...)
2023-01-25 20:08 ` [PATCH v2 03/11] staging: rtl8192e: Remove unused variables rxcrcerrmin and friends Philipp Hortmann
@ 2023-01-25 20:08 ` Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 05/11] staging: rtl8192e: Remove unused variables numqry_ Philipp Hortmann
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
numpacket_toself, numpacket_matchbssid and received_preamble_GI are
initialized and increased but never read. Remove dead code. As a result
the local variable preamble_guardinterval is unused. Remove it also.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
V1->V2: removed unused variable preamble_guardinterval
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 11 -----------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 14 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index e9273dfb638e..b4651cea07a1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1685,10 +1685,6 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
ether_addr_equal(praddr, priv->rtllib->dev->dev_addr);
if (WLAN_FC_GET_FRAMETYPE(fc) == RTLLIB_STYPE_BEACON)
bPacketBeacon = true;
- if (bpacket_match_bssid)
- priv->stats.numpacket_matchbssid++;
- if (bpacket_toself)
- priv->stats.numpacket_toself++;
_rtl92e_process_phyinfo(priv, tmp_buf, &previous_stats, pstats);
_rtl92e_query_rxphystatus(priv, pstats, pdesc, pdrvinfo,
&previous_stats, bpacket_match_bssid,
@@ -1703,18 +1699,12 @@ static void _rtl92e_update_received_rate_histogram_stats(
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
u32 rcvType = 1;
u32 rateIndex;
- u32 preamble_guardinterval;
if (pstats->bCRC)
rcvType = 2;
else if (pstats->bICV)
rcvType = 3;
- if (pstats->bShortPreamble)
- preamble_guardinterval = 1;
- else
- preamble_guardinterval = 0;
-
switch (pstats->rate) {
case MGN_1M:
rateIndex = 0;
@@ -1804,7 +1794,6 @@ static void _rtl92e_update_received_rate_histogram_stats(
rateIndex = 28;
break;
}
- priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++;
priv->stats.received_rate_histogram[0][rateIndex]++;
priv->stats.received_rate_histogram[rcvType][rateIndex]++;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 167c4aeea44e..70767238e721 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,9 +184,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
- unsigned long received_preamble_GI[2][32];
- unsigned long numpacket_matchbssid;
- unsigned long numpacket_toself;
unsigned long num_process_phyinfo;
unsigned long numqry_phystatus;
unsigned long numqry_phystatusCCK;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 05/11] staging: rtl8192e: Remove unused variables numqry_..
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (3 preceding siblings ...)
2023-01-25 20:08 ` [PATCH v2 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre Philipp Hortmann
@ 2023-01-25 20:08 ` Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov Philipp Hortmann
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
numqry_phystatus, numqry_phystatusCCK and numqry_phystatusHT are
initialized and increased but never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 ----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index b4651cea07a1..f62547e54261 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1308,8 +1308,6 @@ static void _rtl92e_query_rxphystatus(
static u8 check_reg824;
static u32 reg824_bit9;
- priv->stats.numqry_phystatus++;
-
is_cck_rate = rx_hal_is_cck_rate(pdrvinfo);
memset(precord_stats, 0, sizeof(struct rtllib_rx_stats));
pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID =
@@ -1341,7 +1339,6 @@ static void _rtl92e_query_rxphystatus(
if (is_cck_rate) {
u8 report;
- priv->stats.numqry_phystatusCCK++;
if (!reg824_bit9) {
report = pcck_buf->cck_agc_rpt & 0xc0;
report >>= 6;
@@ -1416,7 +1413,6 @@ static void _rtl92e_query_rxphystatus(
precord_stats->RxMIMOSignalQuality[1] = -1;
}
} else {
- priv->stats.numqry_phystatusHT++;
for (i = RF90_PATH_A; i < RF90_PATH_MAX; i++) {
if (priv->brfpath_rxenable[i])
rf_rx_num++;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 70767238e721..e38de4d8a467 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -185,9 +185,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
unsigned long num_process_phyinfo;
- unsigned long numqry_phystatus;
- unsigned long numqry_phystatusCCK;
- unsigned long numqry_phystatusHT;
unsigned long received_bwtype[5];
unsigned long rxoverflow;
unsigned long rxint;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov..
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (4 preceding siblings ...)
2023-01-25 20:08 ` [PATCH v2 05/11] staging: rtl8192e: Remove unused variables numqry_ Philipp Hortmann
@ 2023-01-25 20:08 ` Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 07/11] staging: rtl8192e: Remove unused variables rxint, ints and shints Philipp Hortmann
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
num_process_phyinfo, received_bwtype and rxoverflow are initialized and
increased but never read. Remove dead code. As a result prxsc is unused
which in result makes rxsc_sgien_exflg unused. Remove prxsc and
rxsc_sgien_exflg as well.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
V1->V2: Remove prxsc and rxsc_sgien_exflg
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 13 +------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 +---
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
3 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index f62547e54261..9d13fda33fbf 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1296,9 +1296,8 @@ static void _rtl92e_query_rxphystatus(
{
struct phy_sts_ofdm_819xpci *pofdm_buf;
struct phy_sts_cck_819xpci *pcck_buf;
- struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
u8 *prxpkt;
- u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;
+ u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm;
s8 rx_pwr[4], rx_pwr_all = 0;
s8 rx_snrX, rx_evmX;
u8 evm, pwdb_all;
@@ -1464,15 +1463,6 @@ static void _rtl92e_query_rxphystatus(
precord_stats->RxMIMOSignalQuality[i] = evm & 0xff;
}
}
-
-
- rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg;
- prxsc = (struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *)
- &rxsc_sgien_exflg;
- if (pdrvinfo->BW)
- priv->stats.received_bwtype[1+prxsc->rxsc]++;
- else
- priv->stats.received_bwtype[0]++;
}
if (is_cck_rate) {
@@ -1535,7 +1525,6 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
if (!bcheck)
return;
- priv->stats.num_process_phyinfo++;
if (!prev_st->bIsCCK && prev_st->bPacketToSelf) {
for (rfpath = RF90_PATH_A; rfpath < RF90_PATH_C; rfpath++) {
if (!rtl92e_is_legal_rf_path(priv->rtllib->dev, rfpath))
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index e0d0f4faeca7..c5fe8e0aa83f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2183,10 +2183,8 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
tasklet_schedule(&priv->irq_rx_tasklet);
}
- if (inta & IMR_RXFOVW) {
- priv->stats.rxoverflow++;
+ if (inta & IMR_RXFOVW)
tasklet_schedule(&priv->irq_rx_tasklet);
- }
if (inta & IMR_TXFOVW)
priv->stats.txoverflow++;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index e38de4d8a467..bb942283bc7a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,9 +184,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
- unsigned long num_process_phyinfo;
- unsigned long received_bwtype[5];
- unsigned long rxoverflow;
unsigned long rxint;
unsigned long ints;
unsigned long shints;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 07/11] staging: rtl8192e: Remove unused variables rxint, ints and shints
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (5 preceding siblings ...)
2023-01-25 20:08 ` [PATCH v2 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov Philipp Hortmann
@ 2023-01-25 20:09 ` Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 08/11] staging: rtl8192e: Remove unused variables txov.., txbeokint and txbkokint Philipp Hortmann
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rxint, ints and shints are initialized and increased but never read.
Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 +------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index c5fe8e0aa83f..ff9dc06642f6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2123,7 +2123,6 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
spin_lock_irqsave(&priv->irq_th_lock, flags);
priv->ops->interrupt_recognized(dev, &inta, &intb);
- priv->stats.shints++;
if (!inta) {
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
@@ -2135,8 +2134,6 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
goto done;
}
- priv->stats.ints++;
-
if (!netif_running(dev)) {
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
goto done;
@@ -2169,10 +2166,8 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
if (inta & IMR_HIGHDOK)
_rtl92e_tx_isr(dev, HIGH_QUEUE);
- if (inta & IMR_ROK) {
- priv->stats.rxint++;
+ if (inta & IMR_ROK)
tasklet_schedule(&priv->irq_rx_tasklet);
- }
if (inta & IMR_BcnInt)
tasklet_schedule(&priv->irq_prepare_beacon_tasklet);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index bb942283bc7a..2d1561a202d0 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,9 +184,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
- unsigned long rxint;
- unsigned long ints;
- unsigned long shints;
unsigned long txoverflow;
unsigned long txbeokint;
unsigned long txbkokint;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 08/11] staging: rtl8192e: Remove unused variables txov.., txbeokint and txbkokint
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (6 preceding siblings ...)
2023-01-25 20:09 ` [PATCH v2 07/11] staging: rtl8192e: Remove unused variables rxint, ints and shints Philipp Hortmann
@ 2023-01-25 20:09 ` Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 09/11] staging: rtl8192e: Remove unused variables txviok.., txvook.. and txbea Philipp Hortmann
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
txoverflow, txbeokint and txbkokint are initialized and increased but
never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 -----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 8 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index ff9dc06642f6..768324cbe253 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2181,17 +2181,12 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
if (inta & IMR_RXFOVW)
tasklet_schedule(&priv->irq_rx_tasklet);
- if (inta & IMR_TXFOVW)
- priv->stats.txoverflow++;
-
if (inta & IMR_BKDOK) {
- priv->stats.txbkokint++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, BK_QUEUE);
}
if (inta & IMR_BEDOK) {
- priv->stats.txbeokint++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, BE_QUEUE);
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 2d1561a202d0..96d340f686e9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,9 +184,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
- unsigned long txoverflow;
- unsigned long txbeokint;
- unsigned long txbkokint;
unsigned long txviokint;
unsigned long txvookint;
unsigned long txbeaconokint;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 09/11] staging: rtl8192e: Remove unused variables txviok.., txvook.. and txbea..
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (7 preceding siblings ...)
2023-01-25 20:09 ` [PATCH v2 08/11] staging: rtl8192e: Remove unused variables txov.., txbeokint and txbkokint Philipp Hortmann
@ 2023-01-25 20:09 ` Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 10/11] staging: rtl8192e: Remove unused variables txbeac.., txman.. and txcmdp Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 11/11] staging: rtl8192e: Remove unused variables txbytes.., txbyt.. and signa Philipp Hortmann
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
txviokint, txvookint and txbeaconokint are initialized and increased but
never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 -----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 8 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 768324cbe253..4cc90425fa4c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2139,9 +2139,6 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
goto done;
}
- if (inta & IMR_TBDOK)
- priv->stats.txbeaconokint++;
-
if (inta & IMR_TBDER)
priv->stats.txbeaconerr++;
@@ -2192,13 +2189,11 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
}
if (inta & IMR_VIDOK) {
- priv->stats.txviokint++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, VI_QUEUE);
}
if (inta & IMR_VODOK) {
- priv->stats.txvookint++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, VO_QUEUE);
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 96d340f686e9..f8b2201ea288 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,9 +184,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
- unsigned long txviokint;
- unsigned long txvookint;
- unsigned long txbeaconokint;
unsigned long txbeaconerr;
unsigned long txmanageokint;
unsigned long txcmdpktokint;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 10/11] staging: rtl8192e: Remove unused variables txbeac.., txman.. and txcmdp..
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (8 preceding siblings ...)
2023-01-25 20:09 ` [PATCH v2 09/11] staging: rtl8192e: Remove unused variables txviok.., txvook.. and txbea Philipp Hortmann
@ 2023-01-25 20:09 ` Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 11/11] staging: rtl8192e: Remove unused variables txbytes.., txbyt.. and signa Philipp Hortmann
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
txbeaconerr, txmanageokint and txcmdpktokint are initialized and increased
but never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 8 +-------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 4cc90425fa4c..2c5edda74e73 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2139,11 +2139,7 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
goto done;
}
- if (inta & IMR_TBDER)
- priv->stats.txbeaconerr++;
-
if (inta & IMR_MGNTDOK) {
- priv->stats.txmanageokint++;
_rtl92e_tx_isr(dev, MGNT_QUEUE);
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
if (priv->rtllib->ack_tx_to_ieee) {
@@ -2155,10 +2151,8 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
spin_lock_irqsave(&priv->irq_th_lock, flags);
}
- if (inta & IMR_COMDOK) {
- priv->stats.txcmdpktokint++;
+ if (inta & IMR_COMDOK)
_rtl92e_tx_isr(dev, TXCMD_QUEUE);
- }
if (inta & IMR_HIGHDOK)
_rtl92e_tx_isr(dev, HIGH_QUEUE);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index f8b2201ea288..c6a4ac6ce959 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,9 +184,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
- unsigned long txbeaconerr;
- unsigned long txmanageokint;
- unsigned long txcmdpktokint;
unsigned long txbytesmulticast;
unsigned long txbytesbroadcast;
unsigned long txbytesunicast;
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 11/11] staging: rtl8192e: Remove unused variables txbytes.., txbyt.. and signa..
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
` (9 preceding siblings ...)
2023-01-25 20:09 ` [PATCH v2 10/11] staging: rtl8192e: Remove unused variables txbeac.., txman.. and txcmdp Philipp Hortmann
@ 2023-01-25 20:09 ` Philipp Hortmann
10 siblings, 0 replies; 12+ messages in thread
From: Philipp Hortmann @ 2023-01-25 20:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
txbytesmulticast, txbytesbroadcast and signal_quality are initialized and
increased or set but never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +-----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 9d13fda33fbf..3989d484cc33 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1613,7 +1613,6 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
tmp_val = priv->stats.slide_evm_total /
slide_evm_statistics;
- priv->stats.signal_quality = tmp_val;
priv->stats.last_signal_strength_inpercent = tmp_val;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 2c5edda74e73..f8a8ece40ac1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1616,11 +1616,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
type = WLAN_FC_GET_TYPE(fc);
pda_addr = header->addr1;
- if (is_broadcast_ether_addr(pda_addr))
- priv->stats.txbytesbroadcast += skb->len - fwinfo_size;
- else if (is_multicast_ether_addr(pda_addr))
- priv->stats.txbytesmulticast += skb->len - fwinfo_size;
- else
+ if (!is_broadcast_ether_addr(pda_addr) && !is_multicast_ether_addr(pda_addr))
priv->stats.txbytesunicast += skb->len - fwinfo_size;
spin_lock_irqsave(&priv->irq_th_lock, flags);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index c6a4ac6ce959..4cf776094ac0 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,8 +184,6 @@ enum reset_type {
struct rt_stats {
unsigned long received_rate_histogram[4][32];
- unsigned long txbytesmulticast;
- unsigned long txbytesbroadcast;
unsigned long txbytesunicast;
unsigned long rxbytesunicast;
unsigned long txretrycount;
@@ -195,7 +193,6 @@ struct rt_stats {
unsigned long slide_rssi_total;
unsigned long slide_evm_total;
long signal_strength;
- long signal_quality;
long last_signal_strength_inpercent;
long recv_signal_power;
u8 rx_rssi_percentage[4];
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-01-25 20:09 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-25 20:08 [PATCH v2 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 01/11] staging: rtl8192e: Remove unused variables rxrdu and rxok Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 02/11] staging: rtl8192e: Remove unused variables rxdatacrcerr and rxmgmtcrcerr Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 03/11] staging: rtl8192e: Remove unused variables rxcrcerrmin and friends Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 05/11] staging: rtl8192e: Remove unused variables numqry_ Philipp Hortmann
2023-01-25 20:08 ` [PATCH v2 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 07/11] staging: rtl8192e: Remove unused variables rxint, ints and shints Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 08/11] staging: rtl8192e: Remove unused variables txov.., txbeokint and txbkokint Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 09/11] staging: rtl8192e: Remove unused variables txviok.., txvook.. and txbea Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 10/11] staging: rtl8192e: Remove unused variables txbeac.., txman.. and txcmdp Philipp Hortmann
2023-01-25 20:09 ` [PATCH v2 11/11] staging: rtl8192e: Remove unused variables txbytes.., txbyt.. and signa Philipp Hortmann
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).