Skip to contentSkip to conversation

staging: rtl8723bs: cleanup hal/hal_intf.c

PATCH Superseded Nikolay Kulikov 2 participants 14 messages Apr 19 – Apr 27 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: cleanup hal/hal_intf.c

This series removes some wrapper functions from hal/hal_intf.c and replaces them with direct calls to the wrapped functions. This will simplify the code and remove an unnecessary abstraction layer above the hardware.
Also renames several affected functions to snake_case to fix checkpatch.pl warnings.

Nikolay Kulikov (11):
staging: rtl8723bs: remove wrapper rtw_hal_chip_configure()
staging: rtl8723bs: remove wrapper rtw_hal_read_chip_info()
staging: rtl8723bs: remove wrapper rtw_hal_read_chip_version()
staging: rtl8723bs: remove wrapper rtw_hal_def_value_init()
staging: rtl8723bs: remove wrapper rtw_hal_free_data()
staging: rtl8723bs: remove wrapper rtw_hal_dm_init()
staging: rtl8723bs: remove wrapper rtw_hal_enable_interrupt()
staging: rtl8723bs: remove wrapper rtw_hal_disable_interrupt()
staging: rtl8723bs: rename ReadAdapterInfo8723BS() to snake_case
staging: rtl8723bs: rename EnableInterrupt8723BSdio() to snake_case
staging: rtl8723bs: rename DisableInterrupt8723BSdio() to snake_case

 drivers/staging/rtl8723bs/hal/hal_intf.c      | 41 -------------------
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  5 +--
 drivers/staging/rtl8723bs/hal/sdio_ops.c      | 36 +++++++---------
 drivers/staging/rtl8723bs/include/hal_intf.h  | 13 ------
 .../staging/rtl8723bs/include/rtl8723b_recv.h |  2 +-
 drivers/staging/rtl8723bs/include/sdio_ops.h  |  4 +-
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 10 ++---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  | 15 ++++---
 8 files changed, 31 insertions(+), 95 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/11 staging: rtl8723bs: remove wrapper rtw_hal_chip_configure()

Remove the rtw_hal_chip_configure() function, as it's just a wrapper that calls rtl8723bs_interface_configure() directly. Instead, call rtl8723bs_interface_configure() from the appropriate places. This will reduce code complexity and improve readability by removing unnecessary abstraction.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/include/hal_intf.h | 1 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 ++-
 3 files changed, 2 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
index 27c0c0198714..491208431396 100644
@@ -7,11 +7,6 @@
 #include <drv_types.h>
 #include <hal_data.h>
 
-void rtw_hal_chip_configure(struct adapter *padapter)
-{
-	rtl8723bs_interface_configure(padapter);
-}
-
 void rtw_hal_read_chip_info(struct adapter *padapter)
 {
 	ReadAdapterInfo8723BS(padapter);
drivers/staging/rtl8723bs/include/hal_intf.h +0 -1
index b193854bfe6e..7629cef95b06 100644
@@ -195,7 +195,6 @@ 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);
 
-void rtw_hal_chip_configure(struct adapter *padapter);
 void rtw_hal_read_chip_info(struct adapter *padapter);
 void rtw_hal_read_chip_version(struct adapter *padapter);
 
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +2 -1
index d0feb28b7043..f733692784bb 100644
@@ -6,6 +6,7 @@
  ******************************************************************************/
 #include <drv_types.h>
 #include <hal_btcoex.h>
+#include <hal_data.h>
 #include <linux/jiffies.h>
 
 #ifndef dev_to_sdio_func
@@ -265,7 +266,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 
 	rtw_hal_read_chip_version(padapter);
 
-	rtw_hal_chip_configure(padapter);
+	rtl8723bs_interface_configure(padapter);
 
 	hal_btcoex_Initialize((void *)padapter);
 
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/11 staging: rtl8723bs: remove wrapper rtw_hal_read_chip_info()

In reply to Nikolay Kulikov

Remove the rtw_hal_read_chip_info() function, as it's just a wrapper that calls ReadAdapterInfo8723BS() directly. Replace all its calls to the ReadAdapterInfo8723BS() function. This will remove an extra level of abstraction and simplify the code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/include/hal_intf.h | 1 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +-
 3 files changed, 1 insertion(+), 7 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
index 491208431396..da250179fc92 100644
@@ -7,11 +7,6 @@
 #include <drv_types.h>
 #include <hal_data.h>
 
-void rtw_hal_read_chip_info(struct adapter *padapter)
-{
-	ReadAdapterInfo8723BS(padapter);
-}
-
 void rtw_hal_read_chip_version(struct adapter *padapter)
 {
 	rtl8723b_read_chip_version(padapter);
drivers/staging/rtl8723bs/include/hal_intf.h +0 -1
index 7629cef95b06..8f5f2c63fc10 100644
@@ -195,7 +195,6 @@ 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);
 
-void rtw_hal_read_chip_info(struct adapter *padapter);
 void rtw_hal_read_chip_version(struct adapter *padapter);
 
 u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue);
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -1
index f733692784bb..98eff17be9b6 100644
@@ -271,7 +271,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 	hal_btcoex_Initialize((void *)padapter);
 
 	/* 3 6. read efuse/eeprom data */
-	rtw_hal_read_chip_info(padapter);
+	ReadAdapterInfo8723BS(padapter);
 
 	/* 3 7. init driver common data */
 	if (rtw_init_drv_sw(padapter) == _FAIL)
Signature · 1 line
2.53.0
#3 lore raw

PATCH 3/11 staging: rtl8723bs: remove wrapper rtw_hal_read_chip_version()

In reply to Nikolay Kulikov

Remove rtw_hal_read_chip_version() function, as it's just a wrapper that calls rtl8723b_read_chip_version() directly. Replace all its calls to the rtl8723b_read_chip_version(). This will remove an extra level of abstraction and simplify the code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/include/hal_intf.h | 2 --
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
index da250179fc92..c3a238cb0b1e 100644
@@ -7,11 +7,6 @@
 #include <drv_types.h>
 #include <hal_data.h>
 
-void rtw_hal_read_chip_version(struct adapter *padapter)
-{
-	rtl8723b_read_chip_version(padapter);
-}
-
 void rtw_hal_def_value_init(struct adapter *padapter)
 {
 	rtl8723bs_init_default_value(padapter);
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
index 8f5f2c63fc10..0d2f60ce29af 100644
@@ -195,8 +195,6 @@ 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);
 
-void rtw_hal_read_chip_version(struct adapter *padapter);
-
 u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue);
 
 void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet);
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -1
index 98eff17be9b6..e487e238d737 100644
@@ -264,7 +264,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 	if (rtw_init_io_priv(padapter, sdio_set_intf_ops) == _FAIL)
 		goto free_hal_data;
 
-	rtw_hal_read_chip_version(padapter);
+	rtl8723b_read_chip_version(padapter);
 
 	rtl8723bs_interface_configure(padapter);
 
Signature · 1 line
2.53.0
#4 lore raw

PATCH 4/11 staging: rtl8723bs: remove wrapper rtw_hal_def_value_init()

In reply to Nikolay Kulikov

Remove unnecessary wrapper and call rtl8723bs_init_default_value() function directly to simplify code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/include/hal_intf.h | 2 --
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  | 4 ++--
 3 files changed, 2 insertions(+), 9 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
index c3a238cb0b1e..1322713fec6c 100644
@@ -7,11 +7,6 @@
 #include <drv_types.h>
 #include <hal_data.h>
 
-void rtw_hal_def_value_init(struct adapter *padapter)
-{
-	rtl8723bs_init_default_value(padapter);
-}
-
 void rtw_hal_free_data(struct adapter *padapter)
 {
 	/* free HAL Data */
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
index 0d2f60ce29af..f46989ce9e3b 100644
@@ -181,8 +181,6 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);
 #define	RX_PNOWakeUp			0x55
 #define	AP_WakeUp			0x66
 
-void rtw_hal_def_value_init(struct adapter *padapter);
-
 void rtw_hal_free_data(struct adapter *padapter);
 
 void rtw_hal_dm_init(struct adapter *padapter);
drivers/staging/rtl8723bs/os_dep/os_intfs.c +2 -2
index e943dcea1a21..0685ed17a39f 100644
@@ -550,7 +550,7 @@ static void rtw_init_default_value(struct adapter *padapter)
 	rtw_update_registrypriv_dev_network(padapter);
 
 	/* hal_priv */
-	rtw_hal_def_value_init(padapter);
+	rtl8723bs_init_default_value(padapter);
 
 	/* misc. */
 	RTW_ENABLE_FUNC(padapter, DF_RX_BIT);
@@ -609,7 +609,7 @@ void rtw_reset_drv_sw(struct adapter *padapter)
 	struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
 
 	/* hal_priv */
-	rtw_hal_def_value_init(padapter);
+	rtl8723bs_init_default_value(padapter);
 
 	RTW_ENABLE_FUNC(padapter, DF_RX_BIT);
 	RTW_ENABLE_FUNC(padapter, DF_TX_BIT);
Signature · 1 line
2.53.0
#5 lore raw

PATCH 5/11 staging: rtl8723bs: remove wrapper rtw_hal_free_data()

In reply to Nikolay Kulikov

Remove unnecessary wrapper and call rtw_hal_data_deinit() function directly to simplify code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 6 ------
 drivers/staging/rtl8723bs/include/hal_intf.h | 2 --
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  | 2 +-
 3 files changed, 1 insertion(+), 9 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -6
index 1322713fec6c..43b9bf9712c8 100644
@@ -7,12 +7,6 @@
 #include <drv_types.h>
 #include <hal_data.h>
 
-void rtw_hal_free_data(struct adapter *padapter)
-{
-	/* free HAL Data */
-	rtw_hal_data_deinit(padapter);
-}
-
 void rtw_hal_dm_init(struct adapter *padapter)
 {
 	rtl8723b_init_dm_priv(padapter);
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
index f46989ce9e3b..e7cfb255f8f6 100644
@@ -181,8 +181,6 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);
 #define	RX_PNOWakeUp			0x55
 #define	AP_WakeUp			0x66
 
-void rtw_hal_free_data(struct adapter *padapter);
-
 void rtw_hal_dm_init(struct adapter *padapter);
 
 uint rtw_hal_init(struct adapter *padapter);
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -1
index 0685ed17a39f..bd42795fb1a2 100644
@@ -734,7 +734,7 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
 
 	/* kfree((void *)padapter); */
 
-	rtw_hal_free_data(padapter);
+	rtw_hal_data_deinit(padapter);
 
 	/* free the old_pnetdev */
 	if (padapter->rereg_nd_name_priv.old_pnetdev) {
Signature · 1 line
2.53.0
#6 lore raw

PATCH 6/11 staging: rtl8723bs: remove wrapper rtw_hal_dm_init()

In reply to Nikolay Kulikov

Remove unnecessary wrapper and call rtl8723b_init_dm_priv() function directly to simplify code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/include/hal_intf.h | 2 --
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
index 43b9bf9712c8..4448082c14da 100644
@@ -7,11 +7,6 @@
 #include <drv_types.h>
 #include <hal_data.h>
 
-void rtw_hal_dm_init(struct adapter *padapter)
-{
-	rtl8723b_init_dm_priv(padapter);
-}
-
 static void rtw_hal_init_opmode(struct adapter *padapter)
 {
 	enum ndis_802_11_network_infrastructure networkType = Ndis802_11InfrastructureMax;
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
index e7cfb255f8f6..721501ca3b02 100644
@@ -181,8 +181,6 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);
 #define	RX_PNOWakeUp			0x55
 #define	AP_WakeUp			0x66
 
-void rtw_hal_dm_init(struct adapter *padapter);
-
 uint rtw_hal_init(struct adapter *padapter);
 uint rtw_hal_deinit(struct adapter *padapter);
 void rtw_hal_stop(struct adapter *padapter);
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -1
index bd42795fb1a2..0467c87619ca 100644
@@ -674,7 +674,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
 
 	rtw_init_pwrctrl_priv(padapter);
 
-	rtw_hal_dm_init(padapter);
+	rtl8723b_init_dm_priv(padapter);
 
 	return _SUCCESS;
 
Signature · 1 line
2.53.0
#7 lore raw

PATCH 7/11 staging: rtl8723bs: remove wrapper rtw_hal_enable_interrupt()

In reply to Nikolay Kulikov

Remove unnecessary wrapper and call EnableInterrupt8723BSdio() function directly to simplify code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/include/hal_intf.h | 1 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 +--
 3 files changed, 1 insertion(+), 8 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
index 4448082c14da..529648036f58 100644
@@ -94,11 +94,6 @@ void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariab
 	SetHalODMVar(padapter, eVariable, pValue1, bSet);
 }
 
-void rtw_hal_enable_interrupt(struct adapter *padapter)
-{
-	EnableInterrupt8723BSdio(padapter);
-}
-
 void rtw_hal_disable_interrupt(struct adapter *padapter)
 {
 	DisableInterrupt8723BSdio(padapter);
drivers/staging/rtl8723bs/include/hal_intf.h +0 -1
index 721501ca3b02..6af2337822ff 100644
@@ -193,7 +193,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable
 
 void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet);
 
-void rtw_hal_enable_interrupt(struct adapter *padapter);
 void rtw_hal_disable_interrupt(struct adapter *padapter);
 
 u8 rtw_hal_check_ips_status(struct adapter *padapter);
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -2
index e487e238d737..2e573a0a255e 100644
@@ -204,8 +204,7 @@ static void sd_intf_start(struct adapter *padapter)
 	if (!padapter)
 		return;
 
-	/*  hal dep */
-	rtw_hal_enable_interrupt(padapter);
+	EnableInterrupt8723BSdio(padapter);
 }
 
 static void sd_intf_stop(struct adapter *padapter)
Signature · 1 line
2.53.0
#8 lore raw

PATCH 8/11 staging: rtl8723bs: remove wrapper rtw_hal_disable_interrupt()

In reply to Nikolay Kulikov

Remove unnecessary wrapper and call DisableInterrupt8723BSdio() function directly to simplify the code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 3 ---
 drivers/staging/rtl8723bs/include/hal_intf.h | 2 --
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  | 2 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ++---
 5 files changed, 3 insertions(+), 14 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
index 529648036f58..f75b8a8192b8 100644
@@ -94,11 +94,6 @@ void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariab
 	SetHalODMVar(padapter, eVariable, pValue1, bSet);
 }
 
-void rtw_hal_disable_interrupt(struct adapter *padapter)
-{
-	DisableInterrupt8723BSdio(padapter);
-}
-
 u8 rtw_hal_check_ips_status(struct adapter *padapter)
 {
 	return CheckIPSStatus(padapter);
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -3
index f2f73c65a636..20632a28d818 100644
@@ -640,9 +640,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
 		return _SUCCESS;
 	}
 
-	/*  Disable Interrupt first. */
-/* 	rtw_hal_disable_interrupt(padapter); */
-
 	ret = _InitPowerOn_8723BS(padapter);
 	if (ret == _FAIL)
 		return _FAIL;
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
index 6af2337822ff..1d62ea71a890 100644
@@ -193,8 +193,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable
 
 void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet);
 
-void rtw_hal_disable_interrupt(struct adapter *padapter);
-
 u8 rtw_hal_check_ips_status(struct adapter *padapter);
 
 s32	rtw_hal_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -1
index 0467c87619ca..f9995e02485e 100644
@@ -1140,7 +1140,7 @@ static int rtw_resume_process_normal(struct adapter *padapter)
 		if (ret)
 			goto exit;
 	}
-	rtw_hal_disable_interrupt(padapter);
+	DisableInterrupt8723BSdio(padapter);
 	/* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) */
 	if ((padapter->intf_alloc_irq) && (padapter->intf_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS)) {
 		ret = -1;
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +2 -3
index 2e573a0a255e..0574258a0cec 100644
@@ -212,8 +212,7 @@ static void sd_intf_stop(struct adapter *padapter)
 	if (!padapter)
 		return;
 
-	/*  hal dep */
-	rtw_hal_disable_interrupt(padapter);
+	DisableInterrupt8723BSdio(padapter);
 }
 
 
@@ -282,7 +281,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 	/*  set mac addr */
 	rtw_macaddr_cfg(&psdio->func->dev, padapter->eeprompriv.mac_addr);
 
-	rtw_hal_disable_interrupt(padapter);
+	DisableInterrupt8723BSdio(padapter);
 
 	status = _SUCCESS;
 
Signature · 1 line
2.53.0
maintainer
#9 lore raw

Re: [PATCH 08/11] staging: rtl8723bs: remove wrapper rtw_hal_disable_interrupt()

Quoted 11 lines · Nikolay Kulikov

Remove unnecessary wrapper and call DisableInterrupt8723BSdio() function directly to simplify the code.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 5 -----
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 3 ---
 drivers/staging/rtl8723bs/include/hal_intf.h | 2 --
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  | 2 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ++---
 5 files changed, 3 insertions(+), 14 deletions(-)

This patch did not apply for some reason, maybe due to other changes from someone else?

thanks,

greg k-h

#10 lore raw

PATCH 9/11 staging: rtl8723bs: rename ReadAdapterInfo8723BS() to snake_case

In reply to Nikolay Kulikov

Rename function ReadAdapterInfo8723BS() to rtw_read_adapter_info() to comply with Linux kernel coding style and fix checkpatch.pl warning.

---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c      | 2 +-
 drivers/staging/rtl8723bs/include/rtl8723b_recv.h | 2 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_halinit.c +1 -1
index 20632a28d818..93ea9bf78626 100644
@@ -1115,7 +1115,7 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
 	return _SUCCESS;
 }
 
-void ReadAdapterInfo8723BS(struct adapter *padapter)
+void rtw_read_adapter_info(struct adapter *padapter)
 {
 	/*  Read EEPROM size before call any EEPROM function */
 	padapter->EepromAddressSize = GetEEPROMSize8723B(padapter);
drivers/staging/rtl8723bs/include/rtl8723b_recv.h +1 -1
index 783f64de0aec..e9ebecb224a6 100644
@@ -90,6 +90,6 @@ void rtl8723b_process_phy_info(struct adapter *padapter, void *prframe);
 void rtl8723b_read_chip_version(struct adapter *padapter);
 void rtl8723bs_init_default_value(struct adapter *padapter);
 void rtl8723bs_interface_configure(struct adapter *padapter);
-void ReadAdapterInfo8723BS(struct adapter *padapter);
+void rtw_read_adapter_info(struct adapter *padapter);
 
 #endif
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -1
index 0574258a0cec..a462a2864a59 100644
@@ -269,7 +269,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 	hal_btcoex_Initialize((void *)padapter);
 
 	/* 3 6. read efuse/eeprom data */
-	ReadAdapterInfo8723BS(padapter);
+	rtw_read_adapter_info(padapter);
 
 	/* 3 7. init driver common data */
 	if (rtw_init_drv_sw(padapter) == _FAIL)
Signature · 1 line
2.53.0
#11 lore raw

PATCH 10/11 staging: rtl8723bs: rename EnableInterrupt8723BSdio() to snake_case

In reply to Nikolay Kulikov

Rename function EnableInterrupt8723BSdio() to rtw_sdio_enable_interrupt() and format its description to comply with Linux kernel coding style.
Declare this function without 'extern' prototype in the .h file to fix checkpatch.pl warning.

---
 drivers/staging/rtl8723bs/hal/sdio_ops.c     | 19 ++++++++-----------
 drivers/staging/rtl8723bs/include/sdio_ops.h |  2 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c |  2 +-
 3 files changed, 10 insertions(+), 13 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +8 -11
index 8cece69dbf79..0d8d0935e4a2 100644
@@ -712,17 +712,14 @@ void InitSysInterrupt8723BSdio(struct adapter *adapter)
 	haldata->SysIntrMask = (0);
 }
 
-/*  */
-/*	Description: */
-/*		Enalbe SDIO Host Interrupt Mask configuration on SDIO local domain. */
-/*  */
-/*	Assumption: */
-/*		1. Using SDIO Local register ONLY for configuration. */
-/*		2. PASSIVE LEVEL */
-/*  */
-/*	Created by Roger, 2011.02.11. */
-/*  */
-void EnableInterrupt8723BSdio(struct adapter *adapter)
+/*
+ * Enable SDIO Host Interrupt Mask configuration on SDIO local domain.
+ *
+ * Assumption:
+ *	1. Using SDIO Local register ONLY for configuration.
+ *	2. PASSIVE LEVEL
+ */
+void rtw_sdio_enable_interrupt(struct adapter *adapter)
 {
 	struct hal_com_data *haldata;
 	__le32 himr;
drivers/staging/rtl8723bs/include/sdio_ops.h +1 -1
index c7559a884608..7bb4b2047cc1 100644
@@ -27,7 +27,7 @@ extern u8 CheckIPSStatus(struct adapter *padapter);
 
 extern void InitInterrupt8723BSdio(struct adapter *padapter);
 extern void InitSysInterrupt8723BSdio(struct adapter *padapter);
-extern void EnableInterrupt8723BSdio(struct adapter *padapter);
+void rtw_sdio_enable_interrupt(struct adapter *padapter);
 extern void DisableInterrupt8723BSdio(struct adapter *padapter);
 extern u8 HalQueryTxBufferStatus8723BSdio(struct adapter *padapter);
 extern void HalQueryTxOQTBufferStatus8723BSdio(struct adapter *padapter);
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -1
index a462a2864a59..f6fa51f952e0 100644
@@ -204,7 +204,7 @@ static void sd_intf_start(struct adapter *padapter)
 	if (!padapter)
 		return;
 
-	EnableInterrupt8723BSdio(padapter);
+	rtw_sdio_enable_interrupt(padapter);
 }
 
 static void sd_intf_stop(struct adapter *padapter)
Signature · 1 line
2.53.0
#12 lore raw

PATCH 11/11 staging: rtl8723bs: rename DisableInterrupt8723BSdio() to snake_case

In reply to Nikolay Kulikov

Rename function DisableInterrupt8723BSdio() to rtw_sdio_disable_interrupt() and format its description to comply with Linux kernel coding style.
Declare this function without 'extern' prototype in the .h file to fix checkpatch.pl warning.

---
 drivers/staging/rtl8723bs/hal/sdio_ops.c     | 17 +++++++----------
 drivers/staging/rtl8723bs/include/sdio_ops.h |  2 +-
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  |  2 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c |  4 ++--
 4 files changed, 11 insertions(+), 14 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +7 -10
index 0d8d0935e4a2..a7713acccce9 100644
@@ -742,16 +742,13 @@ void rtw_sdio_enable_interrupt(struct adapter *adapter)
 	rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
 }
 
-/*  */
-/*	Description: */
-/*		Disable SDIO Host IMR configuration to mask unnecessary interrupt service. */
-/*  */
-/*	Assumption: */
-/*		Using SDIO Local register ONLY for configuration. */
-/*  */
-/*	Created by Roger, 2011.02.11. */
-/*  */
-void DisableInterrupt8723BSdio(struct adapter *adapter)
+/*
+ * Disable SDIO Host IMR configuration to mask unnecessary interrupt service.
+ *
+ * Assumption:
+ *	Using SDIO Local register ONLY for configuration.
+ */
+void rtw_sdio_disable_interrupt(struct adapter *adapter)
 {
 	__le32 himr;
 
drivers/staging/rtl8723bs/include/sdio_ops.h +1 -1
index 7bb4b2047cc1..13f13076bc16 100644
@@ -28,7 +28,7 @@ extern u8 CheckIPSStatus(struct adapter *padapter);
 extern void InitInterrupt8723BSdio(struct adapter *padapter);
 extern void InitSysInterrupt8723BSdio(struct adapter *padapter);
 void rtw_sdio_enable_interrupt(struct adapter *padapter);
-extern void DisableInterrupt8723BSdio(struct adapter *padapter);
+void rtw_sdio_disable_interrupt(struct adapter *padapter);
 extern u8 HalQueryTxBufferStatus8723BSdio(struct adapter *padapter);
 extern void HalQueryTxOQTBufferStatus8723BSdio(struct adapter *padapter);
 #endif /*  !__SDIO_OPS_H__ */
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -1
index f9995e02485e..b240b8285995 100644
@@ -1140,7 +1140,7 @@ static int rtw_resume_process_normal(struct adapter *padapter)
 		if (ret)
 			goto exit;
 	}
-	DisableInterrupt8723BSdio(padapter);
+	rtw_sdio_disable_interrupt(padapter);
 	/* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) */
 	if ((padapter->intf_alloc_irq) && (padapter->intf_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS)) {
 		ret = -1;
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +2 -2
index f6fa51f952e0..d6e3a74f2edd 100644
@@ -212,7 +212,7 @@ static void sd_intf_stop(struct adapter *padapter)
 	if (!padapter)
 		return;
 
-	DisableInterrupt8723BSdio(padapter);
+	rtw_sdio_disable_interrupt(padapter);
 }
 
 
@@ -281,7 +281,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 	/*  set mac addr */
 	rtw_macaddr_cfg(&psdio->func->dev, padapter->eeprompriv.mac_addr);
 
-	DisableInterrupt8723BSdio(padapter);
+	rtw_sdio_disable_interrupt(padapter);
 
 	status = _SUCCESS;
 
Signature · 1 line
2.53.0
maintainer
#13 lore raw

Re: [PATCH 11/11] staging: rtl8723bs: rename DisableInterrupt8723BSdio() to snake_case

Quoted 94 lines · Nikolay Kulikov

Rename function DisableInterrupt8723BSdio() to rtw_sdio_disable_interrupt() and format its description to comply with Linux kernel coding style.
Declare this function without 'extern' prototype in the .h file to fix checkpatch.pl warning.

---
 drivers/staging/rtl8723bs/hal/sdio_ops.c     | 17 +++++++----------
 drivers/staging/rtl8723bs/include/sdio_ops.h |  2 +-
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  |  2 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c |  4 ++--
 4 files changed, 11 insertions(+), 14 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +7 -10
index 0d8d0935e4a2..a7713acccce9 100644
@@ -742,16 +742,13 @@ void rtw_sdio_enable_interrupt(struct adapter *adapter)
 	rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
 }
 
-/*  */
-/*	Description: */
-/*		Disable SDIO Host IMR configuration to mask unnecessary interrupt service. */
-/*  */
-/*	Assumption: */
-/*		Using SDIO Local register ONLY for configuration. */
-/*  */
-/*	Created by Roger, 2011.02.11. */
-/*  */
-void DisableInterrupt8723BSdio(struct adapter *adapter)
+/*
+ * Disable SDIO Host IMR configuration to mask unnecessary interrupt service.
+ *
+ * Assumption:
+ *	Using SDIO Local register ONLY for configuration.
+ */
+void rtw_sdio_disable_interrupt(struct adapter *adapter)
 {
 	__le32 himr;
 
drivers/staging/rtl8723bs/include/sdio_ops.h +1 -1
index 7bb4b2047cc1..13f13076bc16 100644
@@ -28,7 +28,7 @@ extern u8 CheckIPSStatus(struct adapter *padapter);
 extern void InitInterrupt8723BSdio(struct adapter *padapter);
 extern void InitSysInterrupt8723BSdio(struct adapter *padapter);
 void rtw_sdio_enable_interrupt(struct adapter *padapter);
-extern void DisableInterrupt8723BSdio(struct adapter *padapter);
+void rtw_sdio_disable_interrupt(struct adapter *padapter);
 extern u8 HalQueryTxBufferStatus8723BSdio(struct adapter *padapter);
 extern void HalQueryTxOQTBufferStatus8723BSdio(struct adapter *padapter);
 #endif /*  !__SDIO_OPS_H__ */
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -1
index f9995e02485e..b240b8285995 100644
@@ -1140,7 +1140,7 @@ static int rtw_resume_process_normal(struct adapter *padapter)
 		if (ret)
 			goto exit;
 	}
-	DisableInterrupt8723BSdio(padapter);
+	rtw_sdio_disable_interrupt(padapter);
 	/* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) */
 	if ((padapter->intf_alloc_irq) && (padapter->intf_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS)) {
 		ret = -1;
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +2 -2
index f6fa51f952e0..d6e3a74f2edd 100644
@@ -212,7 +212,7 @@ static void sd_intf_stop(struct adapter *padapter)
 	if (!padapter)
 		return;
 
-	DisableInterrupt8723BSdio(padapter);
+	rtw_sdio_disable_interrupt(padapter);
 }
 
 
@@ -281,7 +281,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 	/*  set mac addr */
 	rtw_macaddr_cfg(&psdio->func->dev, padapter->eeprompriv.mac_addr);
 
-	DisableInterrupt8723BSdio(padapter);
+	rtw_sdio_disable_interrupt(padapter);
 
 	status = _SUCCESS;
 
Signature · 1 line
2.53.0

This one did not apply as well. Can you rebase those 2 patches on my staging-next branch when it shows up on kernel.org tomorrow, and resend them?

thanks,

greg k-h