All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Straube <straube.linux@gmail.com>
Subject: [PATCH] staging: rtl8723bs: remove READ_AND_CONFIG_MP macro
Date: Sun, 17 May 2026 09:28:02 +0200	[thread overview]
Message-ID: <20260517072802.71149-1-straube.linux@gmail.com> (raw)

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


             reply	other threads:[~2026-05-17  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-17  7:28 Michael Straube [this message]
2026-05-18  5:13 ` [PATCH] staging: rtl8723bs: remove READ_AND_CONFIG_MP macro Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260517072802.71149-1-straube.linux@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.