[PATCH 14/61] staging: rtl8723bs: remove ODM_CheckPowerStatus and dead branches

From: Arsenii Pashchenko

Date: Wed Jul 15 2026 - 08:54:23 EST


Delete the dummy ODM_CheckPowerStatus function from HalPhyRf_8723B.c,
which always unconditionally returned true.

Since all of its call sites across the driver checked for the
negative condition (!ODM_CheckPowerStatus), the corresponding
if blocks were unreachable and never executed.

Clean up the codebase by removing both the obsolete function itself
and these dead conditional branches to reduce code bloat.

Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
---
drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
index 70b68f473..b77598287 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
@@ -1077,10 +1077,6 @@ void ODM_SetIQCbyRFpath(struct dm_odm_t *pDM_Odm, u32 RFpath)
}
}

-static bool ODM_CheckPowerStatus(struct adapter *Adapter)
-{
- return true;
-}

static void _PHY_SaveADDARegisters8723B(
struct adapter *padapter,
@@ -1093,8 +1089,6 @@ static void _PHY_SaveADDARegisters8723B(
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
struct dm_odm_t *pDM_Odm = &pHalData->odmpriv;

- if (!ODM_CheckPowerStatus(padapter))
- return;

for (i = 0 ; i < RegisterNum ; i++) {
ADDABackup[i] = PHY_QueryBBReg(pDM_Odm->Adapter, ADDAReg[i], bMaskDWord);
@@ -1556,8 +1550,6 @@ void PHY_IQCalibrate_8723B(
/* u32 Path_SEL_BB = 0; */
u32 GNT_BT_default;

- if (!ODM_CheckPowerStatus(padapter))
- return;

if (!(pDM_Odm->SupportAbility & ODM_RF_CALIBRATION))
return;
--
2.55.0