[PATCH] staging: rtl8723bs: clean up coding style in sdio_intf.c

Vitaliy Slivinskiy posted 1 patch 1 week, 3 days ago
There is a newer version of this series
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
[PATCH] staging: rtl8723bs: clean up coding style in sdio_intf.c
Posted by Vitaliy Slivinskiy 1 week, 3 days ago
Fix checkpatch.pl warnings: remove unnecessary braces for single statement blocks, fix spacing around conditional operators, and remove multiple blank lines.

Signed-off-by: Vitaliy Slivinskiy <phant0m.mail2023@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index d0feb28b7..17829b982 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -19,7 +19,7 @@ static const struct sdio_device_id sdio_ids[] = {
 	{ SDIO_DEVICE(0x024c, 0x0626), },
 	{ SDIO_DEVICE(0x024c, 0x0627), },
 	{ SDIO_DEVICE(0x024c, 0xb723), },
-	{ /* end: all zeroes */				},
+	{ /* end: all zeroes */		   },
 };
 MODULE_DEVICE_TABLE(sdio, sdio_ids);
 
@@ -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)
@@ -77,7 +76,7 @@ static int sdio_alloc_irq(struct dvobj_priv *dvobj)
 
 	sdio_release_host(func);
 
-	return err?_FAIL:_SUCCESS;
+	return err ? _FAIL : _SUCCESS;
 }
 
 static void sdio_free_irq(struct dvobj_priv *dvobj)
@@ -144,13 +143,13 @@ 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);
 	}
 }
+
 static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)
 {
 	struct dvobj_priv *dvobj = NULL;
@@ -216,8 +215,7 @@ static void sd_intf_stop(struct adapter *padapter)
 	rtw_hal_disable_interrupt(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, const struct sdio_device_id *pdid)
 {
 	int status = _FAIL;
 	struct net_device *pnetdev;
@@ -250,11 +248,9 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
 	/* 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;
-
 	padapter->intf_init = &sdio_init;
 	padapter->intf_deinit = &sdio_deinit;
 	padapter->intf_alloc_irq = &sdio_alloc_irq;
@@ -336,9 +332,7 @@ 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;
-- 
2.53.0
Re: [PATCH] staging: rtl8723bs: clean up coding style in sdio_intf.c
Posted by Dan Carpenter 1 week, 3 days ago
On Thu, May 28, 2026 at 09:44:15PM +0300, Vitaliy Slivinskiy wrote:
> Fix checkpatch.pl warnings: remove unnecessary braces for single statement blocks, fix spacing around conditional operators, and remove multiple blank lines.
> 

Work against the staging-next tree.
Split this up into multiple patches.
Run your patch through checkpatch.


> Signed-off-by: Vitaliy Slivinskiy <phant0m.mail2023@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index d0feb28b7..17829b982 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -19,7 +19,7 @@ static const struct sdio_device_id sdio_ids[] = {
>  	{ SDIO_DEVICE(0x024c, 0x0626), },
>  	{ SDIO_DEVICE(0x024c, 0x0627), },
>  	{ SDIO_DEVICE(0x024c, 0xb723), },
> -	{ /* end: all zeroes */				},
> +	{ /* end: all zeroes */		   },

This should just be:

	{ }

No comment because it's obvious.  No comma on the end because
nothing can be added after a sentinal.

>  };
>  MODULE_DEVICE_TABLE(sdio, sdio_ids);

regards,
dan carpenter