Skip to contentSkip to conversation

staging: rtl8723bs: sdio_intf.c: refactor function

PATCH Superseded Manuel Ebner 2 participants 5 messages May 25 – Jul 7 Staging

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/4 staging: rtl8723bs: sdio_intf.c: refactor function

Remove unused argument of rtw_sdio_if1_init().

---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +2 -2
index d0feb28b7043..ff58923e43f1 100644
@@ -217,7 +217,7 @@ static void sd_intf_stop(struct adapter *padapter)
 }
 
 
-static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct sdio_device_id  *pdid)
+static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
 {
 	int status = _FAIL;
 	struct net_device *pnetdev;
@@ -348,7 +348,7 @@ static int rtw_drv_init(
 	if (!dvobj)
 		goto exit;
 
-	if1 = rtw_sdio_if1_init(dvobj, id);
+	if1 = rtw_sdio_if1_init(dvobj);
 	if (!if1)
 		goto free_dvobj;
 
Signature · 1 line
2.54.0
#2 lore raw

PATCH v3 3/4 staging: rtl8723bs: cleanup braces of sdio_intf.c

Reformat function declaration.

---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +2 -3
index 63ec486f9a34..fd805ee74a1b 100644
@@ -334,9 +334,8 @@ static void rtw_sdio_if1_deinit(struct adapter *if1)
  * notes: drv_init() is called when the bus driver has located a card for us to support.
  *        We accept the new device by returning 0.
  */
-static int rtw_drv_init(
-	struct sdio_func *func,
-	const struct sdio_device_id *id)
+static int rtw_drv_init(struct sdio_func *func,
+			const struct sdio_device_id *id)
 {
 	int status = _FAIL;
 	struct adapter *if1 = NULL;
Signature · 1 line
2.54.0
#1 lore raw

PATCH v3 2/4 staging: rtl8723bs: cleanup whitespace of sdio_intf.c

In reply to Manuel Ebner

Add and remove empty lines where appropriate.

---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -3
index ff58923e43f1..63ec486f9a34 100644
@@ -47,7 +47,6 @@ static void sd_sync_int_hdl(struct sdio_func *func)
 {
 	struct dvobj_priv *psdpriv;
 
-
 	psdpriv = sdio_get_drvdata(func);
 
 	if (!psdpriv->if1)
@@ -151,6 +150,7 @@ static void sdio_deinit(struct dvobj_priv *dvobj)
 		sdio_release_host(func);
 	}
 }
+
 static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)
 {
 	struct dvobj_priv *dvobj = NULL;
@@ -216,7 +216,6 @@ static void sd_intf_stop(struct adapter *padapter)
 	rtw_hal_disable_interrupt(padapter);
 }
 
-
 static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
 {
 	int status = _FAIL;
@@ -250,7 +249,6 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
 	/* 4 3.1 set hardware operation functions */
 	rtw_set_hal_ops(padapter);
 
-
 	/* 3 5. initialize Chip version */
 	padapter->intf_start = &sd_intf_start;
 	padapter->intf_stop = &sd_intf_stop;
Signature · 1 line
2.54.0
#3 lore raw

[PATCH v3 4/4 staging: rtl8723bs: cleanup braces of sdio_intf.c

In reply to Manuel Ebner

Remove braces of one-line if arm.

---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -2
index fd805ee74a1b..32a0ee08f175 100644
@@ -143,9 +143,8 @@ static void sdio_deinit(struct dvobj_priv *dvobj)
 		sdio_claim_host(func);
 		sdio_disable_func(func);
 
-		if (dvobj->irq_alloc) {
+		if (dvobj->irq_alloc)
 			sdio_release_irq(func);
-		}
 
 		sdio_release_host(func);
 	}
Signature · 1 line
2.54.0
#4 lore raw

Re: [PATCH v3 4/4 staging: rtl8723bs: cleanup braces of sdio_intf.c

Quoted 6 lines · Manuel Ebner

Remove braces of one-line if arm.

---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

You are missing a ] on the subject line :(