[PATCH 2/5] Staging: rtl8723bs: os_dep: Fix space required coding style
From: Guilherme Tadashi Maeoka
Date: Sat Mar 09 2019 - 13:31:24 EST
Fix multiple space required coding style.
Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@xxxxxxxxx>
---
.../staging/rtl8723bs/os_dep/osdep_service.c | 38 +++++++++----------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
index c7fdcc6bbae3..5a58e1d40f7e 100644
--- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
@@ -77,13 +77,13 @@ static int openFile(struct file **fpp, char *path, int flag, int mode)
{
struct file *fp;
- fp =filp_open(path, flag, mode);
+ fp = filp_open(path, flag, mode);
if (IS_ERR(fp)) {
*fpp = NULL;
return PTR_ERR(fp);
}
else {
- *fpp =fp;
+ *fpp = fp;
return 0;
}
}
@@ -106,10 +106,10 @@ static int readFile(struct file *fp, char *buf, int len)
if (!fp->f_op || !fp->f_op->read)
return -EPERM;
- while (sum<len) {
- rlen =fp->f_op->read(fp, (char __force __user *)buf+sum, len-sum, &fp->f_pos);
- if (rlen>0)
- sum+=rlen;
+ while (sum < len) {
+ rlen = fp->f_op->read(fp, (char __force __user *)buf+sum, len-sum, &fp->f_pos);
+ if (rlen > 0)
+ sum += rlen;
else if (0 != rlen)
return rlen;
else
@@ -132,14 +132,14 @@ static int isFileReadable(char *path)
mm_segment_t oldfs;
char buf;
- fp =filp_open(path, O_RDONLY, 0);
+ fp = filp_open(path, O_RDONLY, 0);
if (IS_ERR(fp)) {
ret = PTR_ERR(fp);
}
else {
oldfs = get_fs(); set_fs(KERNEL_DS);
- if (1!=readFile(fp, &buf, 1))
+ if (1 != readFile(fp, &buf, 1))
ret = -EINVAL;
set_fs(oldfs);
@@ -157,7 +157,7 @@ static int isFileReadable(char *path)
*/
static int retriveFromFile(char *path, u8 *buf, u32 sz)
{
- int ret =-1;
+ int ret = -1;
mm_segment_t oldfs;
struct file *fp;
@@ -165,10 +165,10 @@ static int retriveFromFile(char *path, u8 *buf, u32 sz)
ret = openFile(&fp, path, O_RDONLY, 0);
if (ret == 0) {
- DBG_871X("%s openFile path:%s fp =%p\n", __func__, path , fp);
+ DBG_871X("%s openFile path:%s fp =%p\n", __func__, path, fp);
oldfs = get_fs(); set_fs(KERNEL_DS);
- ret =readFile(fp, buf, sz);
+ ret = readFile(fp, buf, sz);
set_fs(oldfs);
closeFile(fp);
@@ -206,8 +206,8 @@ int rtw_is_file_readable(char *path)
*/
int rtw_retrive_from_file(char *path, u8 *buf, u32 sz)
{
- int ret =retriveFromFile(path, buf, sz);
- return ret>= 0?ret:0;
+ int ret = retriveFromFile(path, buf, sz);
+ return ret >= 0 ? ret : 0;
}
struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv)
@@ -220,8 +220,8 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_p
goto RETURN;
pnpi = netdev_priv(pnetdev);
- pnpi->priv =old_priv;
- pnpi->sizeof_priv =sizeof_priv;
+ pnpi->priv = old_priv;
+ pnpi->sizeof_priv = sizeof_priv;
RETURN:
return pnetdev;
@@ -245,7 +245,7 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv)
goto RETURN;
}
- pnpi->sizeof_priv =sizeof_priv;
+ pnpi->sizeof_priv = sizeof_priv;
RETURN:
return pnetdev;
}
@@ -293,7 +293,7 @@ int rtw_change_ifname(struct adapter *padapter, const char *ifname)
else
unregister_netdevice(cur_pnetdev);
- rereg_priv->old_pnetdev =cur_pnetdev;
+ rereg_priv->old_pnetdev = cur_pnetdev;
pnetdev = rtw_init_netdev(padapter);
if (!pnetdev) {
@@ -388,7 +388,7 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
*/
inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf)
{
- return (cbuf->write == cbuf->read-1)? true : false;
+ return (cbuf->write == cbuf->read-1) ? true : false;
}
/**
@@ -399,7 +399,7 @@ inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf)
*/
inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf)
{
- return (cbuf->write == cbuf->read)? true : false;
+ return (cbuf->write == cbuf->read) ? true : false;
}
/**
--
2.17.1