Commit a89ba681 authored by Hariprasad Kelam's avatar Hariprasad Kelam Committed by Greg Kroah-Hartman

staging: rtl8723bs: fix spaces required around unary operator

this patch fixes below issues reported by checkpatch

ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '<' (ctx:VxV)
Signed-off-by: default avatarHariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e12260a
...@@ -77,13 +77,13 @@ static int openFile(struct file **fpp, char *path, int flag, int mode) ...@@ -77,13 +77,13 @@ static int openFile(struct file **fpp, char *path, int flag, int mode)
{ {
struct file *fp; struct file *fp;
fp =filp_open(path, flag, mode); fp = filp_open(path, flag, mode);
if (IS_ERR(fp)) { if (IS_ERR(fp)) {
*fpp = NULL; *fpp = NULL;
return PTR_ERR(fp); return PTR_ERR(fp);
} }
else { else {
*fpp =fp; *fpp = fp;
return 0; return 0;
} }
} }
...@@ -106,10 +106,10 @@ static int readFile(struct file *fp, char *buf, int len) ...@@ -106,10 +106,10 @@ static int readFile(struct file *fp, char *buf, int len)
if (!fp->f_op || !fp->f_op->read) if (!fp->f_op || !fp->f_op->read)
return -EPERM; return -EPERM;
while (sum<len) { while (sum < len) {
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos); rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
if (rlen>0) if (rlen > 0)
sum+=rlen; sum += rlen;
else if (0 != rlen) else if (0 != rlen)
return rlen; return rlen;
else else
...@@ -131,7 +131,7 @@ static int isFileReadable(char *path) ...@@ -131,7 +131,7 @@ static int isFileReadable(char *path)
int ret = 0; int ret = 0;
char buf; char buf;
fp =filp_open(path, O_RDONLY, 0); fp = filp_open(path, O_RDONLY, 0);
if (IS_ERR(fp)) if (IS_ERR(fp))
return PTR_ERR(fp); return PTR_ERR(fp);
...@@ -151,7 +151,7 @@ static int isFileReadable(char *path) ...@@ -151,7 +151,7 @@ static int isFileReadable(char *path)
*/ */
static int retriveFromFile(char *path, u8 *buf, u32 sz) static int retriveFromFile(char *path, u8 *buf, u32 sz)
{ {
int ret =-1; int ret = -1;
struct file *fp; struct file *fp;
if (path && buf) { if (path && buf) {
...@@ -160,7 +160,7 @@ static int retriveFromFile(char *path, u8 *buf, u32 sz) ...@@ -160,7 +160,7 @@ static int retriveFromFile(char *path, u8 *buf, u32 sz)
if (ret == 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);
ret =readFile(fp, buf, sz); ret = readFile(fp, buf, sz);
closeFile(fp); closeFile(fp);
DBG_871X("%s readFile, ret:%d\n", __func__, ret); DBG_871X("%s readFile, ret:%d\n", __func__, ret);
...@@ -197,8 +197,8 @@ int rtw_is_file_readable(char *path) ...@@ -197,8 +197,8 @@ int rtw_is_file_readable(char *path)
*/ */
int rtw_retrive_from_file(char *path, u8 *buf, u32 sz) int rtw_retrive_from_file(char *path, u8 *buf, u32 sz)
{ {
int ret =retriveFromFile(path, buf, sz); int ret = retriveFromFile(path, buf, sz);
return ret>= 0?ret:0; return ret >= 0 ? ret : 0;
} }
struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv) struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv)
...@@ -211,8 +211,8 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_p ...@@ -211,8 +211,8 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_p
goto RETURN; goto RETURN;
pnpi = netdev_priv(pnetdev); pnpi = netdev_priv(pnetdev);
pnpi->priv =old_priv; pnpi->priv = old_priv;
pnpi->sizeof_priv =sizeof_priv; pnpi->sizeof_priv = sizeof_priv;
RETURN: RETURN:
return pnetdev; return pnetdev;
...@@ -236,7 +236,7 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv) ...@@ -236,7 +236,7 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv)
goto RETURN; goto RETURN;
} }
pnpi->sizeof_priv =sizeof_priv; pnpi->sizeof_priv = sizeof_priv;
RETURN: RETURN:
return pnetdev; return pnetdev;
} }
...@@ -284,7 +284,7 @@ int rtw_change_ifname(struct adapter *padapter, const char *ifname) ...@@ -284,7 +284,7 @@ int rtw_change_ifname(struct adapter *padapter, const char *ifname)
else else
unregister_netdevice(cur_pnetdev); unregister_netdevice(cur_pnetdev);
rereg_priv->old_pnetdev =cur_pnetdev; rereg_priv->old_pnetdev = cur_pnetdev;
pnetdev = rtw_init_netdev(padapter); pnetdev = rtw_init_netdev(padapter);
if (!pnetdev) { if (!pnetdev) {
...@@ -379,7 +379,7 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len) ...@@ -379,7 +379,7 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
*/ */
inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf) 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;
} }
/** /**
...@@ -390,7 +390,7 @@ inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf) ...@@ -390,7 +390,7 @@ inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf)
*/ */
inline bool rtw_cbuf_empty(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;
} }
/** /**
...@@ -408,7 +408,7 @@ bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf) ...@@ -408,7 +408,7 @@ bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf)
DBG_871X("%s on %u\n", __func__, cbuf->write); DBG_871X("%s on %u\n", __func__, cbuf->write);
cbuf->bufs[cbuf->write] = buf; cbuf->bufs[cbuf->write] = buf;
cbuf->write = (cbuf->write+1)%cbuf->size; cbuf->write = (cbuf->write + 1) % cbuf->size;
return _SUCCESS; return _SUCCESS;
} }
...@@ -428,7 +428,7 @@ void *rtw_cbuf_pop(struct rtw_cbuf *cbuf) ...@@ -428,7 +428,7 @@ void *rtw_cbuf_pop(struct rtw_cbuf *cbuf)
DBG_871X("%s on %u\n", __func__, cbuf->read); DBG_871X("%s on %u\n", __func__, cbuf->read);
buf = cbuf->bufs[cbuf->read]; buf = cbuf->bufs[cbuf->read];
cbuf->read = (cbuf->read+1)%cbuf->size; cbuf->read = (cbuf->read + 1) % cbuf->size;
return buf; return buf;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment