mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Subject: [PATCH 08/13] staging: rtl8723bs: Remove function pointer SetHwRegHandlerWithBuf
Date: Sun,  3 Nov 2024 09:14:29 +0100	[thread overview]
Message-ID: <e8bd652b669961e8dfe331a3a27adca47309960a.1730619982.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1730619982.git.philipp.g.hortmann@gmail.com>

Remove function pointer SetHwRegHandlerWithBuf and use
SetHwRegWithBuf8723B directly to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 3 +--
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 3 +--
 drivers/staging/rtl8723bs/include/hal_intf.h | 4 +---
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index d7b29d08ff15..ec567ae99f10 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -118,8 +118,7 @@ void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val)
 
 void rtw_hal_set_hwreg_with_buf(struct adapter *padapter, u8 variable, u8 *pbuf, int len)
 {
-	if (padapter->HalFunc.SetHwRegHandlerWithBuf)
-		padapter->HalFunc.SetHwRegHandlerWithBuf(padapter, variable, pbuf, len);
+	SetHwRegWithBuf8723B(padapter, variable, pbuf, len);
 }
 
 u8 rtw_hal_set_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index d3f86d811879..beb74a40e91e 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1204,7 +1204,7 @@ void GetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val)
 	}
 }
 
-static void SetHwRegWithBuf8723B(struct adapter *padapter, u8 variable, u8 *pbuf, int len)
+void SetHwRegWithBuf8723B(struct adapter *padapter, u8 variable, u8 *pbuf, int len)
 {
 	switch (variable) {
 	case HW_VAR_C2H_HANDLE:
@@ -1259,7 +1259,6 @@ void rtl8723bs_set_hal_ops(struct adapter *padapter)
 
 	rtl8723b_set_hal_ops(pHalFunc);
 
-	pHalFunc->SetHwRegHandlerWithBuf = &SetHwRegWithBuf8723B;
 	pHalFunc->GetHalDefVarHandler = &GetHalDefVar8723BSDIO;
 	pHalFunc->SetHalDefVarHandler = &SetHalDefVar8723BSDIO;
 
diff --git a/drivers/staging/rtl8723bs/include/hal_intf.h b/drivers/staging/rtl8723bs/include/hal_intf.h
index b53804fb186d..d6e8eb95d391 100644
--- a/drivers/staging/rtl8723bs/include/hal_intf.h
+++ b/drivers/staging/rtl8723bs/include/hal_intf.h
@@ -170,8 +170,6 @@ struct hal_ops {
 	void (*hal_dm_watchdog)(struct adapter *padapter);
 	void (*hal_dm_watchdog_in_lps)(struct adapter *padapter);
 
-	void (*SetHwRegHandlerWithBuf)(struct adapter *padapter, u8 variable, u8 *pbuf, int len);
-
 	u8 (*GetHalDefVarHandler)(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue);
 	u8 (*SetHalDefVarHandler)(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue);
 
@@ -317,5 +315,5 @@ s32 rtw_hal_fill_h2c_cmd(struct adapter *, u8 ElementID, u32 CmdLen, u8 *pCmdBuf
 
 void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val);
 void GetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val);
-
+void SetHwRegWithBuf8723B(struct adapter *padapter, u8 variable, u8 *pbuf, int len);
 #endif /* __HAL_INTF_H__ */
-- 
2.43.0


  parent reply	other threads:[~2024-11-03  8:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-03  8:14 [PATCH 00/13] staging: rtl8723bs: Replace function pointers and #if 1 Philipp Hortmann
2024-11-03  8:14 ` [PATCH 01/13] staging: rtl8723bs: Replace function thread_enter Philipp Hortmann
2024-11-03  8:14 ` [PATCH 02/13] staging: rtl8723bs: Remove #if 1 in function hal_EfusePartialWriteCheck Philipp Hortmann
2024-11-03  8:14 ` [PATCH 03/13] staging: rtl8723bs: Remove #if 1 in function hal_EfuseGetCurrentSize_BT Philipp Hortmann
2024-11-03  8:14 ` [PATCH 04/13] staging: rtl8723bs: Remove #if 1 in function ReadChipVersion8723B Philipp Hortmann
2024-11-03  8:14 ` [PATCH 05/13] staging: rtl8723bs: Remove function pointer check_ips_status Philipp Hortmann
2024-11-03  8:14 ` [PATCH 06/13] staging: rtl8723bs: Remove function pointer SetHwRegHandler Philipp Hortmann
2024-11-03  8:14 ` [PATCH 07/13] staging: rtl8723bs: Remove function pointer GetHwRegHandler Philipp Hortmann
2024-11-03  8:14 ` Philipp Hortmann [this message]
2024-11-03  8:14 ` [PATCH 09/13] staging: rtl8723bs: Remove function pointer GetHalDefVarHandler Philipp Hortmann
2024-11-03  8:14 ` [PATCH 10/13] staging: rtl8723bs: Remove function pointer SetHalDefVarHandler Philipp Hortmann
2024-11-03  8:14 ` [PATCH 11/13] staging: rtl8723bs: Remove function pointer hal_xmit Philipp Hortmann
2024-11-03  8:14 ` [PATCH 12/13] staging: rtl8723bs: Remove function pointer mgnt_xmit Philipp Hortmann
2024-11-03  8:14 ` [PATCH 13/13] staging: rtl8723bs: Remove function pointer hal_xmitframe_enqueue Philipp Hortmann

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=e8bd652b669961e8dfe331a3a27adca47309960a.1730619982.git.philipp.g.hortmann@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --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 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®