staging: r8188eu: remove unused fields from struct hal_data_8188e
v2 cover staging: r8188eu: remove unused fields from struct hal_data_8188e
This series removes some unused fields from struct hal_data_8188eu.
Tested on x86_64 with Inter-Tech DMG-02.
v1 -> v2
Fixed a typo in the subject line of patch 3/4.
Michael Straube (4):
staging: r8188eu: remove unused macros from rtl8188e_hal.h
staging: r8188eu: remove write-only fields from struct hal_data_8188e
staging: r8188eu: remove unused enums from rtl8188e_hal.h
staging: r8188eu: remove unused field from struct hal_data_8188e
.../staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ----- .../staging/r8188eu/include/rtl8188e_hal.h | 22 ------------------- 2 files changed, 27 deletions(-)
Signature · 1 line
2.33.0
PATCH v2 1/4 staging: r8188eu: remove unused macros from rtl8188e_hal.h
The macros INCLUDE_MULTI_FUNC_BT and INCLUDE_MULTI_FUNC_GPS are not used in the driver, remove them.
--- drivers/staging/r8188eu/include/rtl8188e_hal.h | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -5
@@ -394,11 +394,6 @@ struct hal_data_8188e { ((struct hal_data_8188e *)((__pAdapter)->HalData))#define GET_RF_TYPE (priv) (GET_HAL_DATA(priv)->rf_type) -#define INCLUDE_MULTI_FUNC_BT (_Adapter) \ - (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_BT) -#define INCLUDE_MULTI_FUNC_GPS (_Adapter) \ - (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_GPS) -/* rtl8188e_hal_init.c */ s32 rtl8188e_FirmwareDownload (struct adapter *padapter);void _8051Reset88E (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v2 2/4 staging: r8188eu: remove write-only fields from struct hal_data_8188e
In reply to Michael StraubeThe fields MultiFunc and RegulatorMode of struct hal_data_8188e are set but never used, remove them.
--- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ----- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 -- 2 files changed, 7 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -5
@@ -1684,12 +1684,7 @@ void rtl8188e_read_chip_version(struct adapter *padapter) ChipVersion.RFType =RF_TYPE_1T1R ; ChipVersion.VendorType = ((value32 &VENDOR_ID ) ?CHIP_VENDOR_UMC :CHIP_VENDOR_TSMC ); ChipVersion.CUTVersion = (value32 &CHIP_VER_RTL_MASK ) >>CHIP_VER_RTL_SHIFT ;/* IC version (CUT) */ - -/* For regulator mode. by tynli. 2011.01.14 */ - pHalData->RegulatorMode = ((value32 &TRP_BT_EN ) ?RT_LDO_REGULATOR :RT_SWITCHING_REGULATOR ); - ChipVersion.ROMVer =0 ;/* ROM code version. */ - pHalData->MultiFunc =RT_MULTI_FUNC_NONE ;dump_chip_info (ChipVersion);
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -2
@@ -223,8 +223,6 @@ enum rt_regulator_mode {struct hal_data_8188e {struct HAL_VERSION VersionID; -enum rt_multi_func MultiFunc;/* For multi-function consideration. */ -enum rt_regulator_mode RegulatorMode;/* switching regulator or LDO */ u16 CustomerID;u16 FirmwareVersion;
Signature · 1 line
2.33.0
PATCH v2 3/4 staging: r8188eu: remove unused enums from rtl8188e_hal.h
In reply to Michael StraubeAfter removing MultiFunc and RegulatorMode from struct hal_data_8188e the enums rt_multi_func and rt_regulator_mode are unused now, remove them.
--- drivers/staging/r8188eu/include/rtl8188e_hal.h | 14 -------------- 1 file changed, 14 deletions(-)
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -14
@@ -207,20 +207,6 @@ struct txpowerinfo24g {#define EFUSE_PROTECT_BYTES_BANK 16 -/* For RTL8723 WiFi/BT/GPS multi-function configuration. */ -enum rt_multi_func { -RT_MULTI_FUNC_NONE =0x00 , -RT_MULTI_FUNC_WIFI =0x01 , -RT_MULTI_FUNC_BT =0x02 , -RT_MULTI_FUNC_GPS =0x04 , -}; - -/* For RTL8723 regulator mode. */ -enum rt_regulator_mode { -RT_SWITCHING_REGULATOR =0 , -RT_LDO_REGULATOR =1 , -}; -struct hal_data_8188e {struct HAL_VERSION VersionID;u16 CustomerID;
Signature · 1 line
2.33.0
PATCH v2 4/4 staging: r8188eu: remove unused field from struct hal_data_8188e
In reply to Michael StraubeField BluetoothCoexist of struct hal_data_8188e is unused, remove it.
--- drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -1
@@ -289,7 +289,6 @@ struct hal_data_8188e {u8 CrystalCap;u32 AntennaTxPath;/* Antenna path Tx */ u32 AntennaRxPath;/* Antenna path Rx */ -u8 BluetoothCoexist;u8 ExternalPA;u8 bLedOpenDrain;/* Open-drain support for controlling the LED.*/
Signature · 1 line
2.33.0
Quoted 13 lines · CEST Michael Straube
This series removes some unused fields from struct
hal_data_8188eu.Tested on
x86_64with Inter-Tech DMG-02.v1 -> v2
Fixed a typo in the subject line of patch 3/4.Michael Straube (4):
staging: r8188eu: remove unused macros fromrtl8188e_hal.h
staging: r8188eu: remove write-only fields from structhal_data_8188e
staging: r8188eu: remove unused enums fromrtl8188e_hal.h
staging: r8188eu: remove unused field from structhal_data_8188e
Quoted 6 lines
.../staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ----- .../staging/r8188eu/include/rtl8188e_hal.h | 22 ------------------- 2 files changed, 27 deletions(-)Signature · 1 line
2.33.0
Hi Michael,
Due to your removals, this driver is now about a third lighter. After fixing that little issue that Philip noticed, this series looks as good as any of yours. So...
Thanks,
Fabio
Quoted 21 lines · Fabio M. De Francesco
Quoted 13 lines · CEST Michael Straube
This series removes some unused fields from struct
hal_data_8188eu.Tested on
x86_64with Inter-Tech DMG-02.v1 -> v2
Fixed a typo in the subject line of patch 3/4.Michael Straube (4):
staging: r8188eu: remove unused macros fromrtl8188e_hal.h
staging: r8188eu: remove write-only fields from structhal_data_8188e
staging: r8188eu: remove unused enums fromrtl8188e_hal.h
staging: r8188eu: remove unused field from structhal_data_8188eQuoted 6 lines
.../staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ----- .../staging/r8188eu/include/rtl8188e_hal.h | 22 ------------------- 2 files changed, 27 deletions(-)Signature · 1 line
2.33.0
Quoted 7 lines
Hi Michael,
Due to your removals, this driver is now about a third lighter. After fixing that little issue that Philip noticed, this series looks as good as any of yours. So...
Thank you Fabio.
Well others have contributed to rip out unused code too. ;) It's nice to see so many people care about this driver. Seems there is a little chance to get it out of staging some day... though there is still a lot of work/cleanup to do.
Regards,
Michael