Skip to content

Commit

Permalink
staging: rtl8192e: Remove unused variables num_proc.., recei.. and rx…
Browse files Browse the repository at this point in the history
…ov..

num_process_phyinfo, received_bwtype and rxoverflow are initialized and
increased but never read. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
  • Loading branch information
Philipp Hortmann authored and intel-lab-lkp committed Jan 24, 2023
1 parent 9a886f4 commit 3d74e04
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
Expand Up @@ -1469,10 +1469,6 @@ static void _rtl92e_query_rxphystatus(
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) {
Expand Down Expand Up @@ -1535,7 +1531,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))
Expand Down
4 changes: 1 addition & 3 deletions drivers/staging/rtl8192e/rtl8192e/rtl_core.c
Expand Up @@ -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++;
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/rtl8192e/rtl8192e/rtl_core.h
Expand Up @@ -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;
Expand Down

0 comments on commit 3d74e04

Please sign in to comment.