staging: r8188eu: remove local variable Indexforchannel
authorMichael Straube <straube.linux@gmail.com>
Sun, 29 Aug 2021 17:56:23 +0000 (19:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:44 +0000 (08:49 +0200)
The local variable Indexforchannel in function
odm_TXPowerTrackingCallback_ThermalMeter_8188E() is initilaized to 0
and never changed. Remove the variable and replace its usage with 0.

Acked-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210829175624.5915-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c

index 356885e..1b0e1e7 100644 (file)
@@ -110,7 +110,6 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
        bool is2t = false;
 
        u8 OFDM_min_index = 6, rf; /* OFDM BB Swing should be less than +3.0dB, which is required by Arthur */
-       u8 Indexforchannel = 0/*GetRightChnlPlaceforIQK(pHalData->CurrentChannel)*/;
        s8 OFDM_index_mapping[2][index_mapping_NUM_88E] = {
                {0, 0, 2, 3, 4, 4,              /* 2.4G, decrease power */
                5, 6, 7, 7, 8, 9,
@@ -280,8 +279,8 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
 
                                /* Adujst OFDM Ant_A according to IQK result */
                                ele_D = (OFDMSwingTable[(u8)OFDM_index[0]] & 0xFFC00000) >> 22;
-                               X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][0];
-                               Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][1];
+                               X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][0];
+                               Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][1];
 
                                /*  Revse TX power table. */
                                dm_odm->BbSwingIdxOfdm          = (u8)OFDM_index[0];
@@ -315,8 +314,8 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
                                        ele_D = (OFDMSwingTable[(u8)OFDM_index[1]] & 0xFFC00000) >> 22;
 
                                        /* new element A = element D x X */
-                                       X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][4];
-                                       Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][5];
+                                       X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][4];
+                                       Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][5];
 
                                        if ((X != 0) && (*dm_odm->pBandType == ODM_BAND_2_4G)) {
                                                if ((X & 0x00000200) != 0)      /* consider minus */