Skip to contentSkip to conversation

staging: rtl8723bs: remove unnecessary adapter

PATCH Superseded Bryan Brattlof 1 participant 2 messages Apr 12, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: remove unnecessary adapter

The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv structure but never used anywhere in the driver. This will remove all definitions of if2

---
 drivers/staging/rtl8723bs/include/drv_types.h |  1 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  | 10 ++++------
 2 files changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/include/drv_types.h +0 -1
index cec8d5ac0e2e..35882dc2654e 100644
@@ -269,7 +269,6 @@ struct cam_entry_cache {
 struct dvobj_priv {
 	/*-------- below is common data --------*/
 	struct adapter *if1; /* PRIMARY_ADAPTER */
-	struct adapter *if2; /* SECONDARY_ADAPTER */
 
 	s32	processing_dev_remove;
 
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +4 -6
index 2b61a4bdd8a1..3545cb6ef886 100644
@@ -381,7 +381,7 @@ static int rtw_drv_init(
 	const struct sdio_device_id *id)
 {
 	int status = _FAIL;
-	struct adapter *if1 = NULL, *if2 = NULL;
+	struct adapter *if1 = NULL;
 	struct dvobj_priv *dvobj;
 
 	dvobj = sdio_dvobj_init(func);
@@ -395,17 +395,15 @@ static int rtw_drv_init(
 	/* dev_alloc_name && register_netdev */
 	status = rtw_drv_register_netdev(if1);
 	if (status != _SUCCESS)
-		goto free_if2;
+		goto free_if1;
 
 	if (sdio_alloc_irq(dvobj) != _SUCCESS)
-		goto free_if2;
+		goto free_if1;
 
 	rtw_ndev_notifier_register();
 	status = _SUCCESS;
 
-free_if2:
-	if (status != _SUCCESS && if2) {
-	}
+free_if1:
 	if (status != _SUCCESS && if1) {
 		rtw_sdio_if1_deinit(if1);
 	}
Signature · 1 line
2.27.0
#1 lore raw

NAK: [PATCH] staging: rtl8723bs: remove unnecessary adapter

Quoted 60 lines · Bryan Brattlof

The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv structure but never used anywhere in the driver. This will remove all definitions of if2

---
drivers/staging/rtl8723bs/include/drv_types.h | 1 - drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 10 ++++------

2 files changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/include/drv_types.h +0 -1
index cec8d5ac0e2e..35882dc2654e 100644
@@ -269,7 +269,6 @@ struct cam_entry_cache {
 struct dvobj_priv {
 	/*-------- below is common data --------*/
 	struct adapter *if1; /* PRIMARY_ADAPTER */
-	struct adapter *if2; /* SECONDARY_ADAPTER */
 
 	s32	processing_dev_remove;
 
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +4 -6
index 2b61a4bdd8a1..3545cb6ef886 100644
@@ -381,7 +381,7 @@ static int rtw_drv_init(
 	const struct sdio_device_id *id)
 {
 	int status = _FAIL;
-	struct adapter *if1 = NULL, *if2 = NULL;
+	struct adapter *if1 = NULL;
 	struct dvobj_priv *dvobj;
 
 	dvobj = sdio_dvobj_init(func);
@@ -395,17 +395,15 @@ static int rtw_drv_init(
 	/* dev_alloc_name && register_netdev */
 	status = rtw_drv_register_netdev(if1);
 	if (status != _SUCCESS)
-		goto free_if2;
+		goto free_if1;
 
 	if (sdio_alloc_irq(dvobj) != _SUCCESS)
-		goto free_if2;
+		goto free_if1;
 
 	rtw_ndev_notifier_register();
 	status = _SUCCESS;
 
-free_if2:
-	if (status != _SUCCESS && if2) {
-	}
+free_if1:
 	if (status != _SUCCESS && if1) {
 		rtw_sdio_if1_deinit(if1);
 	}
Signature · 1 line
2.27.0

Nack. There is a merge conflict when updating to next-20210412. I'll resend v2 after I resolve the conflict.

--
~Bryan