Skip to contentSkip to conversation

staging: rtl8723bs: tidy up rtw_io.c formatting

PATCH In review Sarah Gershuni 2 participants 7 messages Feb 12 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: tidy up rtw_io.c formatting

This series resolves checkpatch.pl warnings in rtw_io.c.

All changes are style-only with no functional impact.

Patch 1 removes redundant parentheses.
Patch 2 fixes blank line style issues.
Patch 3 fixes overlong lines.

Sarah Gershuni (3):
staging: rtl8723bs: remove unnecessary parentheses in rtw_io.c
staging: rtl8723bs: fix blank line style issues in rtw_io.c
staging: rtl8723bs: fix long lines in rtw_io.c

 drivers/staging/rtl8723bs/core/rtw_io.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/3 staging: rtl8723bs: remove unnecessary parentheses in rtw_io.c

Remove redundant parentheses around structure member address expressions reported by checkpatch.pl:

CHECK: Unnecessary parentheses around pio_priv->intf

Seven instances were updated.

---
 drivers/staging/rtl8723bs/core/rtw_io.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/core/rtw_io.c +7 -7
index fe9f94001eed..7bc09a50d4dd 100644
@@ -29,7 +29,7 @@ u8 rtw_read8(struct adapter *adapter, u32 addr)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
 	struct io_priv *pio_priv = &adapter->iopriv;
-	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
+	struct	intf_hdl		*pintfhdl = &pio_priv->intf;
 	u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
 
 	_read8 = pintfhdl->io_ops._read8;
@@ -41,7 +41,7 @@ u16 rtw_read16(struct adapter *adapter, u32 addr)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
 	struct io_priv *pio_priv = &adapter->iopriv;
-	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
+	struct	intf_hdl		*pintfhdl = &pio_priv->intf;
 	u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
 
 	_read16 = pintfhdl->io_ops._read16;
@@ -53,7 +53,7 @@ u32 rtw_read32(struct adapter *adapter, u32 addr)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
 	struct io_priv *pio_priv = &adapter->iopriv;
-	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
+	struct	intf_hdl		*pintfhdl = &pio_priv->intf;
 	u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
 
 	_read32 = pintfhdl->io_ops._read32;
@@ -66,7 +66,7 @@ int rtw_write8(struct adapter *adapter, u32 addr, u8 val)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
 	struct io_priv *pio_priv = &adapter->iopriv;
-	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
+	struct	intf_hdl		*pintfhdl = &pio_priv->intf;
 	int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
 	int ret;
 
@@ -80,7 +80,7 @@ int rtw_write16(struct adapter *adapter, u32 addr, u16 val)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
 	struct io_priv *pio_priv = &adapter->iopriv;
-	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
+	struct	intf_hdl		*pintfhdl = &pio_priv->intf;
 	int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
 	int ret;
 
@@ -93,7 +93,7 @@ int rtw_write32(struct adapter *adapter, u32 addr, u32 val)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
 	struct io_priv *pio_priv = &adapter->iopriv;
-	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
+	struct	intf_hdl		*pintfhdl = &pio_priv->intf;
 	int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
 	int ret;
 
@@ -108,7 +108,7 @@ u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 {
 	u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
 	struct io_priv *pio_priv = &adapter->iopriv;
-	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
+	struct	intf_hdl		*pintfhdl = &pio_priv->intf;
 
 	_write_port = pintfhdl->io_ops._write_port;
 
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 1/3] staging: rtl8723bs: remove unnecessary parentheses in rtw_io.c

Quoted 9 lines · Sarah Gershuni

Remove redundant parentheses around structure member address expressions reported by checkpatch.pl:

CHECK: Unnecessary parentheses around pio_priv->intf

Seven instances were updated.

---

This has already been fixed in staging-next. Please use that branch when submitting patches to staging.

Thanks,

ET

#3 lore raw

PATCH 2/3 staging: rtl8723bs: fix blank line style issues in rtw_io.c

In reply to Sarah Gershuni

Fix checkpatch.pl style warnings related to blank lines:

CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Please use a blank line after function declarations

Adjust spacing to comply with kernel coding style.

---
 drivers/staging/rtl8723bs/core/rtw_io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_io.c +2 -1
index 7bc09a50d4dd..cc00ea80daae 100644
@@ -59,7 +59,6 @@ u32 rtw_read32(struct adapter *adapter, u32 addr)
 	_read32 = pintfhdl->io_ops._read32;
 
 	return _read32(pintfhdl, addr);
-
 }
 
 int rtw_write8(struct adapter *adapter, u32 addr, u8 val)
@@ -76,6 +75,7 @@ int rtw_write8(struct adapter *adapter, u32 addr, u8 val)
 
 	return RTW_STATUS_CODE(ret);
 }
+
 int rtw_write16(struct adapter *adapter, u32 addr, u16 val)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
@@ -89,6 +89,7 @@ int rtw_write16(struct adapter *adapter, u32 addr, u16 val)
 	ret = _write16(pintfhdl, addr, val);
 	return RTW_STATUS_CODE(ret);
 }
+
 int rtw_write32(struct adapter *adapter, u32 addr, u32 val)
 {
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
Signature · 1 line
2.43.0
#4 lore raw

Re: [PATCH 2/3] staging: rtl8723bs: fix blank line style issues in rtw_io.c

Quoted 9 lines · Sarah Gershuni

Fix checkpatch.pl style warnings related to blank lines:

CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Please use a blank line after function declarations

Adjust spacing to comply with kernel coding style.

---

This has already been fixed in staging-next. Please use that branch when submitting patches to staging.

Thanks,

ET

#5 lore raw

PATCH 3/3 staging: rtl8723bs: fix long lines in rtw_io.c

In reply to Sarah Gershuni

Split long lines reported by checkpatch.pl to comply with the 100-column limit.

---
 drivers/staging/rtl8723bs/core/rtw_io.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_io.c +5 -2
index cc00ea80daae..a50939541cf7 100644
@@ -116,7 +116,9 @@ u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 	return _write_port(pintfhdl, addr, cnt, pmem);
 }
 
-int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapter *padapter, struct _io_ops *pops))
+int rtw_init_io_priv(struct adapter *padapter,
+		     void (*set_intf_ops)(struct adapter *padapter,
+					  struct _io_ops *pops))
 {
 	struct io_priv *piopriv = &padapter->iopriv;
 	struct intf_hdl *pintf = &piopriv->intf;
@@ -134,7 +136,8 @@ int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapt
 }
 
 /*
- * Increase and check if the continual_io_error of this @param dvobjprive is larger than MAX_CONTINUAL_IO_ERR
+ * Increase and check if the continual_io_error of this @param dvobjprive is larger
+ * than MAX_CONTINUAL_IO_ERR
  * @return true:
  * @return false:
  */
Signature · 1 line
2.43.0