mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: remove unused BoardType field and its parser
@ 2026-10-02 20:13 Rishik Yechuri
  0 siblings, 0 replies; only message in thread
From: Rishik Yechuri @ 2026-10-02 20:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Rishik Yechuri, Jennifer Guo, Gabriel Windlin, linux-staging,
	linux-kernel

Hal_EfuseParseBoardType_8723BS() reads the board option byte from the
efuse and stores bits 5 through 7 in pHalData->BoardType. Nothing in
the driver ever reads pHalData->BoardType, so the value isn't used.

The function also tries to fall back to a default when the efuse byte
is unprogrammed, but the check can never be true:

      BoardType = (hwinfo[...] & 0xE0) >> 5;  /* at most 7 */
      if (BoardType == 0xFF)                  /* never true */

Remove the function, the one place it's called, and the unused
BoardType member of struct hal_com_data. This doesn't change how the
driver behaves.

Signed-off-by: Rishik Yechuri <rishik.yechuri.code@gmail.com>
---

Notes:
    Compile-tested only. I don't have the rtl8723bs hardware.

 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 16 ----------------
 drivers/staging/rtl8723bs/include/hal_data.h |  1 -
 2 files changed, 17 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 4a2f5c3bb..26e0ea465 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -933,21 +933,6 @@ static void Hal_EfuseParseMACAddr_8723BS(
 	}
 }
 
-static void Hal_EfuseParseBoardType_8723BS(
-	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
-)
-{
-	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-
-	if (!AutoLoadFail) {
-		pHalData->BoardType = (hwinfo[EEPROM_RF_BOARD_OPTION_8723B] & 0xE0) >> 5;
-		if (pHalData->BoardType == 0xFF)
-			pHalData->BoardType = (EEPROM_DEFAULT_BOARD_OPTION & 0xE0) >> 5;
-	} else {
-		pHalData->BoardType = 0;
-	}
-}
-
 static void _ReadEfuseInfo8723BS(struct adapter *padapter)
 {
 	struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
@@ -963,7 +948,6 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)
 	Hal_EfuseParseMACAddr_8723BS(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 
 	Hal_EfuseParseTxPowerInfo_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
-	Hal_EfuseParseBoardType_8723BS(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 
 	/*  Read Bluetooth co-exist and initialize */
 	Hal_EfuseParsePackageType_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h
index c345b632b..588dada52 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -186,7 +186,6 @@ struct hal_com_data {
 	u8 TypeALNA;
 	u8 TypeAPA;
 	u8 RFEType;
-	u8 BoardType;
 	bool		bLCKInProgress;
 
 	bool		bSwChnl;
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-02 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 20:13 [PATCH] staging: rtl8723bs: remove unused BoardType field and its parser Rishik Yechuri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®