From 58e7509dac66c008a9085c490127590cc9ab0fa2 Mon Sep 17 00:00:00 2001 From: Philipp Hortmann Date: Wed, 25 Jan 2023 21:08:47 +0100 Subject: [PATCH] staging: rtl8192e: Remove unused variables numpacket.. and received_pre.. 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 Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0ed5f4134176393110fdb0b7424df7a8a6fc6262.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman --- 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 e9273df..b4651cea0 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 167c4ae..7076723 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.7.4