[PATCH 4/4] Fix lines longer than 80 chars

2019-03-19 Thread Ariel Torti
From: Ariel Torti 

Signed-off-by: Ariel Torti 
---
 drivers/staging/rtl8723bs/core/rtw_io.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c 
b/drivers/staging/rtl8723bs/core/rtw_io.c
index 0470074..480227a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -121,14 +121,17 @@ u8 _rtw_sd_f0_read8(struct adapter *adapter, u32 addr)
if (_sd_f0_read8)
r_val = _sd_f0_read8(pintfhdl, addr);
else
-   DBG_871X_LEVEL(_drv_warning_, FUNC_ADPT_FMT" _sd_f0_read8 
callback is NULL\n", FUNC_ADPT_ARG(adapter));
+   DBG_871X_LEVEL(_drv_warning_, FUNC_ADPT_FMT
+  " _sd_f0_read8 callback is NULL\n",
+  FUNC_ADPT_ARG(adapter));
 
return r_val;
 }
 
 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);
+   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);
u32 ret = _SUCCESS;
@@ -140,7 +143,9 @@ u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 
cnt, u8 *pmem)
return ret;
 }
 
-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;
@@ -170,7 +175,8 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv 
*dvobj)
int value = atomic_inc_return(&dvobj->continual_io_error);
 
if (value > MAX_CONTINUAL_IO_ERR) {
-   DBG_871X("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", 
dvobj, value, MAX_CONTINUAL_IO_ERR);
+   DBG_871X("[dvobj:%p][ERROR] continual_io_error:%d > %d\n",
+dvobj, value, MAX_CONTINUAL_IO_ERR);
ret = true;
}
return ret;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/4] Add blank lines at the end of file and after functions

2019-03-19 Thread Ariel Torti
From: Ariel Torti 

Signed-off-by: Ariel Torti 
---
 drivers/staging/rtl8723bs/core/rtw_io.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c 
b/drivers/staging/rtl8723bs/core/rtw_io.c
index fc0fd245..0470074 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -81,6 +81,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_priv *pio_priv = &adapter->iopriv;
@@ -93,6 +94,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_priv *pio_priv = &adapter->iopriv;
@@ -166,6 +168,7 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv 
*dvobj)
 {
int ret = false;
int value = atomic_inc_return(&dvobj->continual_io_error);
+
if (value > MAX_CONTINUAL_IO_ERR) {
DBG_871X("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", 
dvobj, value, MAX_CONTINUAL_IO_ERR);
ret = true;
@@ -180,3 +183,4 @@ void rtw_reset_continual_io_error(struct dvobj_priv *dvobj)
 {
atomic_set(&dvobj->continual_io_error, 0);
 }
+
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/4] Remove commented code

2019-03-19 Thread Ariel Torti
From: Ariel Torti 

Signed-off-by: Ariel Torti 
---
 drivers/staging/rtl8723bs/core/rtw_io.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c 
b/drivers/staging/rtl8723bs/core/rtw_io.c
index 16f7b34..fc0fd245 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -32,7 +32,6 @@
 u8 _rtw_read8(struct adapter *adapter, u32 addr)
 {
u8 r_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);
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
@@ -46,7 +45,6 @@ u8 _rtw_read8(struct adapter *adapter, u32 addr)
 u16 _rtw_read16(struct adapter *adapter, u32 addr)
 {
u16 r_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);
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
@@ -60,7 +58,6 @@ u16 _rtw_read16(struct adapter *adapter, u32 addr)
 u32 _rtw_read32(struct adapter *adapter, u32 addr)
 {
u32 r_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);
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
@@ -69,12 +66,10 @@ u32 _rtw_read32(struct adapter *adapter, u32 addr)
 
r_val = _read32(pintfhdl, addr);
return rtw_le32_to_cpu(r_val);
-
 }
 
 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);
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
@@ -88,7 +83,6 @@ int _rtw_write8(struct adapter *adapter, u32 addr, u8 val)
 }
 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);
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
@@ -101,7 +95,6 @@ int _rtw_write16(struct adapter *adapter, u32 addr, u16 val)
 }
 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);
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
@@ -176,8 +169,6 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv 
*dvobj)
if (value > MAX_CONTINUAL_IO_ERR) {
DBG_871X("[dvobj:%p][ERROR] continual_io_error:%d > %d\n", 
dvobj, value, MAX_CONTINUAL_IO_ERR);
ret = true;
-   } else {
-   /* DBG_871X("[dvobj:%p] continual_io_error:%d\n", dvobj, 
value); */
}
return ret;
 }
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/4] Fix comment style in header and functions

2019-03-19 Thread Ariel Torti
From: Ariel Torti 

Signed-off-by: Ariel Torti 
---
 drivers/staging/rtl8723bs/core/rtw_io.c | 50 +++--
 1 file changed, 23 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c 
b/drivers/staging/rtl8723bs/core/rtw_io.c
index d341069..16f7b34 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -3,27 +3,21 @@
  *
  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  *
- 
**/
-/*
-
-The purpose of rtw_io.c
-
-a. provides the API
-
-b. provides the protocol engine
-
-c. provides the software interface between caller and the hardware interface
-
-
-Compiler Flag Option:
-
-1. CONFIG_SDIO_HCI:
-a. USE_SYNC_IRP:  Only sync operations are provided.
-b. USE_ASYNC_IRP:Both sync/async operations are provided.
-
-jack...@realtek.com.tw
-
-*/
+ **
+ *
+ * The purpose of rtw_io.c
+ * - Provides the API
+ * - Provides the protocol engine
+ * - Provides the software interface between caller and the hardware interface
+ *
+ *
+ * Compiler Flag Option:
+ * 1. CONFIG_SDIO_HCI:
+ *   a. USE_SYNC_IRP:  Only sync operations are provided.
+ *   b. USE_ASYNC_IRP: Both sync/async operations are provided.
+ *
+ * jack...@realtek.com.tw
+ */
 
 #define _RTW_IO_C_
 
@@ -169,10 +163,12 @@ 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
-* @return true:
-* @return false:
-*/
+ * Increase and check if the continual_io_error of this @param dvobjprive
+ * is larger than MAX_CONTINUAL_IO_ERR
+ *
+ * @return true:
+ * @return false:
+ */
 int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
 {
int ret = false;
@@ -187,8 +183,8 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv 
*dvobj)
 }
 
 /*
-* Set the continual_io_error of this @param dvobjprive to 0
-*/
+ * Set the continual_io_error of this @param dvobjprive to 0
+ */
 void rtw_reset_continual_io_error(struct dvobj_priv *dvobj)
 {
atomic_set(&dvobj->continual_io_error, 0);
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/4] Clean up comments and code

2019-03-19 Thread Ariel Torti
From: Ariel Torti 

Patches cleaning up comments and code

Ariel Torti (4):
  Fix comment style in header and functions
  Remove commented code
  Add blank lines at the end of file and after functions
  Fix lines longer than 80 chars

 drivers/staging/rtl8723bs/core/rtw_io.c | 77 -
 1 file changed, 37 insertions(+), 40 deletions(-)

--
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: Clean up comments and code

2019-03-09 Thread Ariel Torti
From: Ariel Torti 

Header and function comment style fixed.
Remove commented code.
Fix lines longer than 80 characters.

Signed-off-by: Ariel Torti 
---
 drivers/staging/rtl8723bs/core/rtw_io.c | 77 -
 1 file changed, 37 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c 
b/drivers/staging/rtl8723bs/core/rtw_io.c
index d341069..480227a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -3,27 +3,21 @@
  *
  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  *
- 
**/
-/*
-
-The purpose of rtw_io.c
-
-a. provides the API
-
-b. provides the protocol engine
-
-c. provides the software interface between caller and the hardware interface
-
-
-Compiler Flag Option:
-
-1. CONFIG_SDIO_HCI:
-a. USE_SYNC_IRP:  Only sync operations are provided.
-b. USE_ASYNC_IRP:Both sync/async operations are provided.
-
-jack...@realtek.com.tw
-
-*/
+ **
+ *
+ * The purpose of rtw_io.c
+ * - Provides the API
+ * - Provides the protocol engine
+ * - Provides the software interface between caller and the hardware interface
+ *
+ *
+ * Compiler Flag Option:
+ * 1. CONFIG_SDIO_HCI:
+ *   a. USE_SYNC_IRP:  Only sync operations are provided.
+ *   b. USE_ASYNC_IRP: Both sync/async operations are provided.
+ *
+ * jack...@realtek.com.tw
+ */
 
 #define _RTW_IO_C_
 
@@ -38,7 +32,6 @@ jack...@realtek.com.tw
 u8 _rtw_read8(struct adapter *adapter, u32 addr)
 {
u8 r_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);
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
@@ -52,7 +45,6 @@ u8 _rtw_read8(struct adapter *adapter, u32 addr)
 u16 _rtw_read16(struct adapter *adapter, u32 addr)
 {
u16 r_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);
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
@@ -66,7 +58,6 @@ u16 _rtw_read16(struct adapter *adapter, u32 addr)
 u32 _rtw_read32(struct adapter *adapter, u32 addr)
 {
u32 r_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);
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
@@ -75,12 +66,10 @@ u32 _rtw_read32(struct adapter *adapter, u32 addr)
 
r_val = _read32(pintfhdl, addr);
return rtw_le32_to_cpu(r_val);
-
 }
 
 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);
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
@@ -92,9 +81,9 @@ 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; */
struct io_priv *pio_priv = &adapter->iopriv;
struct  intf_hdl*pintfhdl = &(pio_priv->intf);
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
@@ -105,9 +94,9 @@ 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; */
struct io_priv *pio_priv = &adapter->iopriv;
struct  intf_hdl*pintfhdl = &(pio_priv->intf);
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
@@ -132,14 +121,17 @@ u8 _rtw_sd_f0_read8(struct adapter *adapter, u32 addr)
if (_sd_f0_read8)
r_val = _sd_f0_read8(pintfhdl, addr);
else
-   DBG_871X_LEVEL(_drv_warning_, FUNC_ADPT_FMT" _sd_f0_read8 
callback is NULL\n", FUNC_ADPT_ARG(adapter));
+   DBG_871X_LEVEL(_drv_warning_, FUNC_ADPT_FMT
+  " _sd_f0_read8 callback is NULL\n",
+  FUNC_ADPT_ARG(adapter));
 
return r_val;
 }
 
 u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)