staging: r8188eu: remove set but unused variable
authorMichael Straube <straube.linux@gmail.com>
Mon, 30 Aug 2021 09:21:51 +0000 (11:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:45 +0000 (08:49 +0200)
The local variable rfPath in Hal_SetAntennaPathPower() and
Hal_SetTxPower() is set but not used. Remove the variable
and related code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210830092153.9283-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/rtl8188e_mp.c

index 49c672383e43b211a088369a7259f1594be07bc2..ec1d7e90547e1710bc8b9b557d71347e320bb048 100644 (file)
@@ -221,24 +221,10 @@ void Hal_SetAntennaPathPower(struct adapter *pAdapter)
 {
        struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter);
        u8 TxPowerLevel[RF_PATH_MAX];
-       u8 rfPath;
 
        TxPowerLevel[RF_PATH_A] = pAdapter->mppriv.txpoweridx;
        TxPowerLevel[RF_PATH_B] = pAdapter->mppriv.txpoweridx_b;
 
-       switch (pAdapter->mppriv.antenna_tx) {
-       case ANTENNA_A:
-       default:
-               rfPath = RF_PATH_A;
-               break;
-       case ANTENNA_B:
-               rfPath = RF_PATH_B;
-               break;
-       case ANTENNA_C:
-               rfPath = RF_PATH_C;
-               break;
-       }
-
        switch (pHalData->rf_chip) {
        case RF_8225:
        case RF_8256:
@@ -256,24 +242,11 @@ void Hal_SetTxPower(struct adapter *pAdapter)
        struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter);
        u8 TxPower = pAdapter->mppriv.txpoweridx;
        u8 TxPowerLevel[RF_PATH_MAX];
-       u8 rf, rfPath;
+       u8 rf;
 
        for (rf = 0; rf < RF_PATH_MAX; rf++)
                TxPowerLevel[rf] = TxPower;
 
-       switch (pAdapter->mppriv.antenna_tx) {
-       case ANTENNA_A:
-       default:
-               rfPath = RF_PATH_A;
-               break;
-       case ANTENNA_B:
-               rfPath = RF_PATH_B;
-               break;
-       case ANTENNA_C:
-               rfPath = RF_PATH_C;
-               break;
-       }
-
        switch (pHalData->rf_chip) {
        /*  2008/09/12 MH Test only !! We enable the TX power tracking for MP!!!!! */
        /*  We should call normal driver API later!! */