staging: r8188eu: remove unused dm_priv components
authorMartin Kaiser <martin@kaiser.cx>
Wed, 20 Oct 2021 19:53:57 +0000 (21:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Oct 2021 08:27:05 +0000 (10:27 +0200)
Remove unused components from struct dm_priv.

DMFlag is only written to, but never read.
InitDMFlag is assigned to DMFlag and not used elsewhere.
DM_Type is also write-only.
UndecoratedSmoothedPWDB and UndecoratedSmoothedCCK are not used at all.

Acked-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211020195401.12931-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/rtl8188e_dm.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/rtl8188e_dm.h

index 4ce2c374966572b2408a05aabbaf895227e10fa8..5d76f6ea91c49a0fa5697e5dc4ca4ac94d5a84fe 100644 (file)
@@ -87,12 +87,9 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
 void rtl8188e_InitHalDm(struct adapter *Adapter)
 {
        struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
-       struct dm_priv  *pdmpriv = &hal_data->dmpriv;
        struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
 
        dm_InitGPIOSetting(Adapter);
-       pdmpriv->DM_Type = DM_Type_ByDriver;
-       pdmpriv->DMFlag = DYNAMIC_FUNC_DISABLE;
        Update_ODM_ComInfo_88E(Adapter);
        ODM_DMInit(dm_odm);
        Adapter->fix_rate = 0xFF;
index cdc602fa9af8bc8557a9ffe4dc61e1a719cbefbc..ef1ae95d7db08ebfcdd7bc78af6dcd25e8ec7843 100644 (file)
@@ -1469,7 +1469,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                break;
        case HW_VAR_DM_FUNC_SET:
                if (*((u32 *)val) == DYNAMIC_ALL_FUNC_ENABLE) {
-                       pdmpriv->DMFlag = pdmpriv->InitDMFlag;
                        podmpriv->SupportAbility =      pdmpriv->InitODMFlag;
                } else {
                        podmpriv->SupportAbility |= *((u32 *)val);
index 4a0608313f7a7c79eb80bfaeb2ec4a49b5f3c07b..208bea050f6f840d1ed1c04778efbd59a8d13a79 100644 (file)
@@ -15,14 +15,9 @@ enum{
 #define HP_THERMAL_NUM         8
 /*  duplicate code,will move to ODM ######### */
 struct dm_priv {
-       u8      DM_Type;
-       u8      DMFlag;
-       u8      InitDMFlag;
        u32     InitODMFlag;
 
        /*  Upper and Lower Signal threshold for Rate Adaptive*/
-       int     UndecoratedSmoothedPWDB;
-       int     UndecoratedSmoothedCCK;
        int     EntryMinUndecoratedSmoothedPWDB;
        int     EntryMaxUndecoratedSmoothedPWDB;
        int     MinUndecoratedPWDBForDM;