staging: rtl8192e: Remove unused variables numpacket.. and received_pre..
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Wed, 25 Jan 2023 20:08:47 +0000 (21:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jan 2023 09:12:04 +0000 (10:12 +0100)
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>
Link: https://lore.kernel.org/r/0ed5f4134176393110fdb0b7424df7a8a6fc6262.1674675808.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.h

index e9273dfb638ee9f96386563168ecfe4b9e549698..b4651cea07a1d5e0d900fe7c5171ccfbb0ec18da 100644 (file)
@@ -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]++;
 }
index 167c4aeea44ef190f0fe4cda5fa3d2f34119d4c9..70767238e721c4a9775fba6fce907b150d72eb43 100644 (file)
@@ -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;