Skip to contentSkip to conversation

staging: rtl8723bs: cleanup hal/hal_intf.c

PATCH In review Nikolay Kulikov 2 participants 5 messages Apr 30 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover staging: rtl8723bs: cleanup hal/hal_intf.c

This series is leftover patches from v1 that Greg was unable to apply.

Link to v1:
https://lore.kernel.org/linux-staging/[email protected]/

Changes in v2:
- Rebase on staging-next

Nikolay Kulikov (2):
staging: rtl8723bs: remove wrapper rtw_hal_disable_interrupt()
staging: rtl8723bs: rename DisableInterrupt8723BSdio() to snake_case

 drivers/staging/rtl8723bs/hal/hal_intf.c     |  5 -----
 drivers/staging/rtl8723bs/hal/sdio_ops.c     | 17 +++++++----------
 drivers/staging/rtl8723bs/include/hal_intf.h |  2 --
 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 |  5 ++---
 6 files changed, 11 insertions(+), 22 deletions(-)
Signature · 1 line
2.54.0
#1 lore raw

PATCH v2 1/2 staging: rtl8723bs: remove wrapper rtw_hal_disable_interrupt()

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

---

Changes in v2:
- rebase on staging-next

 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 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ++---
 4 files changed, 3 insertions(+), 11 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/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 b80f1d03ed5a..9270daa018b9 100644
@@ -1141,7 +1141,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 97a1e0da3034..387c5165428c 100644
@@ -211,8 +211,7 @@ static void sd_intf_stop(struct adapter *padapter)
 	if (!padapter)
 		return;
 
-	/*  hal dep */
-	rtw_hal_disable_interrupt(padapter);
+	DisableInterrupt8723BSdio(padapter);
 }
 
 
@@ -281,7 +280,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.54.0
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] staging: rtl8723bs: remove wrapper rtw_hal_disable_interrupt()

Quoted 8 lines

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

---
Changes in v2:
- rebase on staging-next

Quoted 6 lines
 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 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ++---
 4 files changed, 3 insertions(+), 11 deletions(-)

...

LGTM,

Best regards,
Luka Gejak

#3 lore raw

PATCH v2 2/2 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.

---

Changes in v2:
- rebase on staging-next

 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 77a6a5c7ec7e..5d74913be573 100644
@@ -626,16 +626,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 9270daa018b9..f31196f54b3e 100644
@@ -1141,7 +1141,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 387c5165428c..550b538add85 100644
@@ -211,7 +211,7 @@ static void sd_intf_stop(struct adapter *padapter)
 	if (!padapter)
 		return;
 
-	DisableInterrupt8723BSdio(padapter);
+	rtw_sdio_disable_interrupt(padapter);
 }
 
 
@@ -280,7 +280,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.54.0
Reviewed-by on v2 2/2
#4 lore raw

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

Quoted 11 lines

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.

---
Changes in v2:
- rebase on staging-next

Quoted 6 lines
 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(-)

As far as I see in v1, Greg doesn't mind this patch doing multiple things at once, therefore:
LGTM,

Best regards,
Luka Gejak