staging: rtl8192e: Remove unused Array Rtl8192PciERadioC_Array
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Tue, 7 Mar 2023 21:01:06 +0000 (22:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Mar 2023 16:11:58 +0000 (17:11 +0100)
The array Rtl8192PciERadioC_Array is only used in function
rtl92e_config_rf_path which is only called in function rtl92e_config_rf.
In function rtl92e_config_rf a termination condition for the loop is set
to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. The loop is only
executed with numbers 0 and 1 for eRFPath. So the function
rtl92e_config_rf_path is only called with eRFPath for 0 and 1 and never
with 2 that would make the "case RF90_PATH_C:" be called. Remove
resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/ed1e0df7ed677c335340f42c1108e7b5c0f18462.1678222487.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h
drivers/staging/rtl8192e/rtl8192e/table.c
drivers/staging/rtl8192e/rtl8192e/table.h

index 35ca01a..fe0ef52 100644 (file)
@@ -649,18 +649,6 @@ u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath)
                                          bMask12Bits,
                                          Rtl819XRadioB_Array[i+1]);
 
-               }
-               break;
-       case RF90_PATH_C:
-               for (i = 0; i < RadioC_ArrayLength; i += 2) {
-                       if (Rtl819XRadioC_Array[i] == 0xfe) {
-                               msleep(100);
-                               continue;
-                       }
-                       rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioC_Array[i],
-                                         bMask12Bits,
-                                         Rtl819XRadioC_Array[i+1]);
-
                }
                break;
        case RF90_PATH_D:
index 561a4c8..6772ed3 100644 (file)
@@ -14,7 +14,6 @@
 #define RadioA_ArrayLength                     RadioA_ArrayLengthPciE
 #define RadioB_ArrayLength                     RadioB_ArrayLengthPciE
 #define MACPHY_Array_PGLength                  MACPHY_Array_PGLengthPciE
-#define RadioC_ArrayLength                     RadioC_ArrayLengthPciE
 #define RadioD_ArrayLength                     RadioD_ArrayLengthPciE
 #define PHY_REG_1T2RArrayLength                        PHY_REG_1T2RArrayLengthPciE
 
@@ -22,7 +21,6 @@
 #define Rtl819XMACPHY_Array                    Rtl8192PciEMACPHY_Array
 #define Rtl819XRadioA_Array                    Rtl8192PciERadioA_Array
 #define Rtl819XRadioB_Array                    Rtl8192PciERadioB_Array
-#define Rtl819XRadioC_Array                    Rtl8192PciERadioC_Array
 #define Rtl819XRadioD_Array                    Rtl8192PciERadioD_Array
 #define Rtl819XAGCTAB_Array                    Rtl8192PciEAGCTAB_Array
 #define Rtl819XPHY_REG_1T2RArray               Rtl8192PciEPHY_REG_1T2RArray
index d04608d..4e97ad4 100644 (file)
@@ -325,9 +325,6 @@ u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] = {
        0x007, 0x00000700,
 };
 
-u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE] = {
-       0x0,  };
-
 u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE] = {
        0x0, };
 
index 177fe21..981e8b5 100644 (file)
@@ -17,8 +17,6 @@ extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE];
 extern u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE];
 #define RadioB_ArrayLengthPciE 78
 extern u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE];
-#define RadioC_ArrayLengthPciE 2
-extern u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE];
 #define RadioD_ArrayLengthPciE 2
 extern u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE];
 #define MACPHY_ArrayLengthPciE 18