All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e
@ 2021-09-15  9:01 Michael Straube
  2021-09-15  9:01 ` [PATCH v2 1/4] staging: r8188eu: remove unused macros from rtl8188e_hal.h Michael Straube
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Michael Straube @ 2021-09-15  9:01 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

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(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/4] staging: r8188eu: remove unused macros from rtl8188e_hal.h
  2021-09-15  9:01 [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e Michael Straube
@ 2021-09-15  9:01 ` Michael Straube
  2021-09-15  9:01 ` [PATCH v2 2/4] staging: r8188eu: remove write-only fields from struct hal_data_8188e Michael Straube
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2021-09-15  9:01 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

The macros INCLUDE_MULTI_FUNC_BT and INCLUDE_MULTI_FUNC_GPS are not
used in the driver, remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/rtl8188e_hal.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 537a8d17642c..f16ffd952215 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -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);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/4] staging: r8188eu: remove write-only fields from struct hal_data_8188e
  2021-09-15  9:01 [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e Michael Straube
  2021-09-15  9:01 ` [PATCH v2 1/4] staging: r8188eu: remove unused macros from rtl8188e_hal.h Michael Straube
@ 2021-09-15  9:01 ` Michael Straube
  2021-09-15  9:01 ` [PATCH v2 3/4] staging: r8188eu: remove unused enums from rtl8188e_hal.h Michael Straube
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2021-09-15  9:01 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

The fields MultiFunc and RegulatorMode of struct hal_data_8188e are
set but never used, remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 -----
 drivers/staging/r8188eu/include/rtl8188e_hal.h  | 2 --
 2 files changed, 7 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index c1188117a5cc..5c6c62e3f6ed 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -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);
 
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index f16ffd952215..7e2feb390416 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -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;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 3/4] staging: r8188eu: remove unused enums from rtl8188e_hal.h
  2021-09-15  9:01 [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e Michael Straube
  2021-09-15  9:01 ` [PATCH v2 1/4] staging: r8188eu: remove unused macros from rtl8188e_hal.h Michael Straube
  2021-09-15  9:01 ` [PATCH v2 2/4] staging: r8188eu: remove write-only fields from struct hal_data_8188e Michael Straube
@ 2021-09-15  9:01 ` Michael Straube
  2021-09-15  9:01 ` [PATCH v2 4/4] staging: r8188eu: remove unused field from struct hal_data_8188e Michael Straube
  2021-09-15 13:34 ` [PATCH v2 0/4] staging: r8188eu: remove unused fields " Fabio M. De Francesco
  4 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2021-09-15  9:01 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

After removing MultiFunc and RegulatorMode from struct hal_data_8188e
the enums rt_multi_func and rt_regulator_mode are unused now, remove
them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/rtl8188e_hal.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 7e2feb390416..17913dcc9fbe 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -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;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 4/4] staging: r8188eu: remove unused field from struct hal_data_8188e
  2021-09-15  9:01 [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e Michael Straube
                   ` (2 preceding siblings ...)
  2021-09-15  9:01 ` [PATCH v2 3/4] staging: r8188eu: remove unused enums from rtl8188e_hal.h Michael Straube
@ 2021-09-15  9:01 ` Michael Straube
  2021-09-15 13:34 ` [PATCH v2 0/4] staging: r8188eu: remove unused fields " Fabio M. De Francesco
  4 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2021-09-15  9:01 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Field BluetoothCoexist of struct hal_data_8188e is unused, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 17913dcc9fbe..e7e7064dd356 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -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.*/
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e
  2021-09-15  9:01 [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e Michael Straube
                   ` (3 preceding siblings ...)
  2021-09-15  9:01 ` [PATCH v2 4/4] staging: r8188eu: remove unused field from struct hal_data_8188e Michael Straube
@ 2021-09-15 13:34 ` Fabio M. De Francesco
  2021-09-15 15:49   ` Michael Straube
  4 siblings, 1 reply; 7+ messages in thread
From: Fabio M. De Francesco @ 2021-09-15 13:34 UTC (permalink / raw)
  To: gregkh, Michael Straube
  Cc: Larry.Finger, phil, martin, linux-staging, linux-kernel, Michael Straube

On Wednesday, September 15, 2021 11:01:52 AM CEST Michael Straube wrote:
> 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(-)
> 
> -- 
> 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...

Acked-by:  Fabio M. De Francesco <fmdefrancesco@gmail.com>

Thanks,

Fabio




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e
  2021-09-15 13:34 ` [PATCH v2 0/4] staging: r8188eu: remove unused fields " Fabio M. De Francesco
@ 2021-09-15 15:49   ` Michael Straube
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2021-09-15 15:49 UTC (permalink / raw)
  To: Fabio M. De Francesco, gregkh
  Cc: Larry.Finger, phil, martin, linux-staging, linux-kernel

On 9/15/21 15:34, Fabio M. De Francesco wrote:
> On Wednesday, September 15, 2021 11:01:52 AM CEST Michael Straube wrote:
>> 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(-)
>>
>> -- 
>> 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...
> 
> Acked-by:  Fabio M. De Francesco <fmdefrancesco@gmail.com>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-15 15:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15  9:01 [PATCH v2 0/4] staging: r8188eu: remove unused fields from struct hal_data_8188e Michael Straube
2021-09-15  9:01 ` [PATCH v2 1/4] staging: r8188eu: remove unused macros from rtl8188e_hal.h Michael Straube
2021-09-15  9:01 ` [PATCH v2 2/4] staging: r8188eu: remove write-only fields from struct hal_data_8188e Michael Straube
2021-09-15  9:01 ` [PATCH v2 3/4] staging: r8188eu: remove unused enums from rtl8188e_hal.h Michael Straube
2021-09-15  9:01 ` [PATCH v2 4/4] staging: r8188eu: remove unused field from struct hal_data_8188e Michael Straube
2021-09-15 13:34 ` [PATCH v2 0/4] staging: r8188eu: remove unused fields " Fabio M. De Francesco
2021-09-15 15:49   ` Michael Straube

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.