* [PATCH 1/3] staging: rtl8723bs: os_dep: fixed trailing statements
@ 2020-09-15 0:17 Ross Schmidt
2020-09-15 0:17 ` [PATCH 2/3] staging: rtl8723bs: os_dep: fixed bracing issue Ross Schmidt
2020-09-15 0:17 ` [PATCH 3/3] staging: rtl8723bs: os_dep: fixed spacing around operators issue Ross Schmidt
0 siblings, 2 replies; 4+ messages in thread
From: Ross Schmidt @ 2020-09-15 0:17 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Ross Schmidt
Fixed a coding style issue by moving trailing statements to new lines in
sdio_ops_linux.c to fix checkpatch errors.
Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
index 50b89340465b..bc8cef5589b8 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
@@ -264,9 +264,11 @@ u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
*err = 0;
for (i = 0; i < SD_IO_TRY_CNT; i++) {
- if (claim_needed) sdio_claim_host(func);
+ if (claim_needed)
+ sdio_claim_host(func);
v = sdio_readl(func, addr, err);
- if (claim_needed) sdio_release_host(func);
+ if (claim_needed)
+ sdio_release_host(func);
if (*err == 0) {
rtw_reset_continual_io_error(psdiodev);
@@ -355,9 +357,11 @@ void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err)
*err = 0;
for (i = 0; i < SD_IO_TRY_CNT; i++) {
- if (claim_needed) sdio_claim_host(func);
+ if (claim_needed)
+ sdio_claim_host(func);
sdio_writel(func, v, addr, err);
- if (claim_needed) sdio_release_host(func);
+ if (claim_needed)
+ sdio_release_host(func);
if (*err == 0) {
rtw_reset_continual_io_error(psdiodev);
break;
--
2.26.2
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] staging: rtl8723bs: os_dep: fixed bracing issue
2020-09-15 0:17 [PATCH 1/3] staging: rtl8723bs: os_dep: fixed trailing statements Ross Schmidt
@ 2020-09-15 0:17 ` Ross Schmidt
2020-09-15 0:17 ` [PATCH 3/3] staging: rtl8723bs: os_dep: fixed spacing around operators issue Ross Schmidt
1 sibling, 0 replies; 4+ messages in thread
From: Ross Schmidt @ 2020-09-15 0:17 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Ross Schmidt
Fixed a coding style issue by removing unnecessary braces in
sdio_ops_linux.c to fix checkpatch warnings.
Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
index bc8cef5589b8..87fc87662075 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
@@ -275,9 +275,8 @@ u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err)
break;
} else {
DBG_871X(KERN_ERR "%s: (%d) addr = 0x%05x, val = 0x%x, try_cnt =%d\n", __func__, *err, addr, v, i);
- if ((-ESHUTDOWN == *err) || (-ENODEV == *err)) {
+ if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
padapter->bSurpriseRemoved = true;
- }
if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
padapter->bSurpriseRemoved = true;
@@ -367,9 +366,8 @@ void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err)
break;
} else {
DBG_871X(KERN_ERR "%s: (%d) addr = 0x%05x, val = 0x%x, try_cnt =%d\n", __func__, *err, addr, v, i);
- if ((-ESHUTDOWN == *err) || (-ENODEV == *err)) {
+ if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
padapter->bSurpriseRemoved = true;
- }
if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
padapter->bSurpriseRemoved = true;
@@ -436,9 +434,9 @@ s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
}
err = sdio_memcpy_fromio(func, pdata, addr, cnt);
- if (err) {
+ if (err)
DBG_871X(KERN_ERR "%s: FAIL(%d)! ADDR =%#x Size =%d\n", __func__, err, addr, cnt);
- }
+
return err;
}
@@ -538,9 +536,9 @@ s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
size = cnt;
err = sdio_memcpy_toio(func, addr, pdata, size);
- if (err) {
+ if (err)
DBG_871X(KERN_ERR "%s: FAIL(%d)! ADDR =%#x Size =%d(%d)\n", __func__, err, addr, cnt, size);
- }
+
return err;
}
--
2.26.2
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] staging: rtl8723bs: os_dep: fixed spacing around operators issue
2020-09-15 0:17 [PATCH 1/3] staging: rtl8723bs: os_dep: fixed trailing statements Ross Schmidt
2020-09-15 0:17 ` [PATCH 2/3] staging: rtl8723bs: os_dep: fixed bracing issue Ross Schmidt
@ 2020-09-15 0:17 ` Ross Schmidt
2020-09-15 2:30 ` Joe Perches
1 sibling, 1 reply; 4+ messages in thread
From: Ross Schmidt @ 2020-09-15 0:17 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Ross Schmidt
Fixed a coding style issue by adding spaces around operators in
sdio_ops_linux.c to fix checkpatch checks.
Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
---
.../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
index 87fc87662075..079da433d811 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
@@ -84,9 +84,9 @@ s32 _sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata)
func = psdio->func;
for (i = 0; i < cnt; i++) {
- pdata[i] = sdio_readb(func, addr+i, &err);
+ pdata[i] = sdio_readb(func, addr + i, &err);
if (err) {
- DBG_871X(KERN_ERR "%s: FAIL!(%d) addr = 0x%05x\n", __func__, err, addr+i);
+ DBG_871X(KERN_ERR "%s: FAIL!(%d) addr = 0x%05x\n", __func__, err, addr + i);
break;
}
}
@@ -154,9 +154,10 @@ s32 _sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata)
func = psdio->func;
for (i = 0; i < cnt; i++) {
- sdio_writeb(func, pdata[i], addr+i, &err);
+ sdio_writeb(func, pdata[i], addr + i, &err);
if (err) {
- DBG_871X(KERN_ERR "%s: FAIL!(%d) addr = 0x%05x val = 0x%02x\n", __func__, err, addr+i, pdata[i]);
+ DBG_871X(KERN_ERR "%s: FAIL!(%d) addr = 0x%05x val = 0x%02x\n", __func__,
+ err, addr + i, pdata[i]);
break;
}
}
@@ -423,7 +424,7 @@ s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
u8 *pbuf = pdata;
for (i = 0; i < cnt; i++) {
- *(pbuf+i) = sdio_readb(func, addr+i, &err);
+ *(pbuf + i) = sdio_readb(func, addr + i, &err);
if (err) {
DBG_871X(KERN_ERR "%s: FAIL!(%d) addr = 0x%05x\n", __func__, err, addr);
@@ -524,9 +525,10 @@ s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata)
u8 *pbuf = pdata;
for (i = 0; i < cnt; i++) {
- sdio_writeb(func, *(pbuf+i), addr+i, &err);
+ sdio_writeb(func, *(pbuf + i), addr + i, &err);
if (err) {
- DBG_871X(KERN_ERR "%s: FAIL!(%d) addr = 0x%05x val = 0x%02x\n", __func__, err, addr, *(pbuf+i));
+ DBG_871X(KERN_ERR "%s: FAIL!(%d) addr = 0x%05x val = 0x%02x\n",
+ __func__, err, addr, *(pbuf + i));
break;
}
}
--
2.26.2
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 3/3] staging: rtl8723bs: os_dep: fixed spacing around operators issue
2020-09-15 0:17 ` [PATCH 3/3] staging: rtl8723bs: os_dep: fixed spacing around operators issue Ross Schmidt
@ 2020-09-15 2:30 ` Joe Perches
0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2020-09-15 2:30 UTC (permalink / raw)
To: Ross Schmidt, gregkh; +Cc: devel, linux-kernel
On Mon, 2020-09-14 at 19:17 -0500, Ross Schmidt wrote:
> Fixed a coding style issue by adding spaces around operators in
> sdio_ops_linux.c to fix checkpatch checks.
Hello Ross.
If you want to do more than fix whitespace,
please look at the #define for DBG_871X.
All the uses with a KERN_<LEVEL> are broken
and should be modified as _dbgdump is just
printk and DRIVER_PREFIX is "RTL8723BS: "
so the KERN_<LEVEL> after the DRIVER_PREFIX.
That's just broken.
#define DBG_871X(...) do {\
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\
} while (0)
Realistically, the DBG_871X macro family should just
use pr_debug and all the KERN_<LEVEL> uses should be
removed.
The define and uses of RT_TRACE should also just be
converted to use pr_debug or some other function
to perhaps reduce overall object size
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-15 2:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 0:17 [PATCH 1/3] staging: rtl8723bs: os_dep: fixed trailing statements Ross Schmidt
2020-09-15 0:17 ` [PATCH 2/3] staging: rtl8723bs: os_dep: fixed bracing issue Ross Schmidt
2020-09-15 0:17 ` [PATCH 3/3] staging: rtl8723bs: os_dep: fixed spacing around operators issue Ross Schmidt
2020-09-15 2:30 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).