[PATCH] staging: rtl8723bs: remove READ_AND_CONFIG_MP macro

Michael Straube posted 1 patch 1 week ago
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
[PATCH] staging: rtl8723bs: remove READ_AND_CONFIG_MP macro
Posted by Michael Straube 1 week ago
Remove the READ_AND_CONFIG_MP macro from odm_HWConfig.c and call the
ODM_ReadAndConfig_MP_* functions directly to reduce code complexity and
improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index 4784d33eab0e..937002495d09 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -7,9 +7,6 @@
 
 #include "odm_precomp.h"
 
-#define READ_AND_CONFIG_MP(ic, txt) (ODM_ReadAndConfig_MP_##ic##txt(pDM_Odm))
-#define READ_AND_CONFIG     READ_AND_CONFIG_MP
-
 static u8 odm_query_rx_pwr_percentage(s8 ant_power)
 {
 	if ((ant_power <= -100) || (ant_power >= 20))
@@ -415,9 +412,9 @@ enum hal_status ODM_ConfigRFWithHeaderFile(
 )
 {
 	if (ConfigType == CONFIG_RF_RADIO)
-		READ_AND_CONFIG(8723B, _RadioA);
+		ODM_ReadAndConfig_MP_8723B_RadioA(pDM_Odm);
 	else if (ConfigType == CONFIG_RF_TXPWR_LMT)
-		READ_AND_CONFIG(8723B, _TXPWR_LMT);
+		ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(pDM_Odm);
 
 	return HAL_STATUS_SUCCESS;
 }
@@ -425,7 +422,7 @@ enum hal_status ODM_ConfigRFWithHeaderFile(
 enum hal_status ODM_ConfigRFWithTxPwrTrackHeaderFile(struct dm_odm_t *pDM_Odm)
 {
 	if (pDM_Odm->SupportInterface == ODM_ITRF_SDIO)
-		READ_AND_CONFIG(8723B, _TxPowerTrack_SDIO);
+		ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(pDM_Odm);
 
 	return HAL_STATUS_SUCCESS;
 }
@@ -435,11 +432,11 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
 )
 {
 	if (ConfigType == CONFIG_BB_PHY_REG)
-		READ_AND_CONFIG(8723B, _PHY_REG);
+		ODM_ReadAndConfig_MP_8723B_PHY_REG(pDM_Odm);
 	else if (ConfigType == CONFIG_BB_AGC_TAB)
-		READ_AND_CONFIG(8723B, _AGC_TAB);
+		ODM_ReadAndConfig_MP_8723B_AGC_TAB(pDM_Odm);
 	else if (ConfigType == CONFIG_BB_PHY_REG_PG)
-		READ_AND_CONFIG(8723B, _PHY_REG_PG);
+		ODM_ReadAndConfig_MP_8723B_PHY_REG_PG(pDM_Odm);
 
 	return HAL_STATUS_SUCCESS;
 }
-- 
2.53.0
Re: [PATCH] staging: rtl8723bs: remove READ_AND_CONFIG_MP macro
Posted by Dan Carpenter 1 week ago
On Sun, May 17, 2026 at 09:28:02AM +0200, Michael Straube wrote:
> Remove the READ_AND_CONFIG_MP macro from odm_HWConfig.c and call the
> ODM_ReadAndConfig_MP_* functions directly to reduce code complexity and
> improve readability.
> 
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---

Reviewed-by: Dan Carpenter <error27@gmail.com>

regards,
dan carpenter