From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Straube <straube.linux@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Hans de Goede <hdegoede@redhat.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8723bs: fix indentation issues
Date: Sun, 9 Jun 2019 11:07:41 +0530 [thread overview]
Message-ID: <20190609053741.GA12637@hari-Inspiron-1545> (raw)
fix below issues reported by checkpatch
CHECK: Please don't use multiple blank lines
WARNING: space prohibited between function name and open parenthesis '('
+void _rtw_open_pktfile (_pkt *pktptr, struct pkt_file *pfile)
WARNING: space prohibited before semicolon
WARNING: space prohibited between function name and open parenthesis '('
CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: Comparison to NULL could be written "!pxmitbuf->pallocated_buf"
CHECK: spaces preferred around that '*' (ctx:VxV)
CHECK: spaces preferred around that '/' (ctx:VxV)
WARNING: Missing a blank line after declarations
WARNING: braces {} are not necessary for single statement blocks
CHECK: spaces preferred around that '/' (ctx:VxV)
CHECK: Using comparison to true is error prone
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 4e4e565..39abfaf 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -9,22 +9,21 @@
#include <drv_types.h>
#include <rtw_debug.h>
-
uint rtw_remainder_len(struct pkt_file *pfile)
{
return (pfile->buf_len - ((SIZE_PTR)(pfile->cur_addr) - (SIZE_PTR)(pfile->buf_start)));
}
-void _rtw_open_pktfile (_pkt *pktptr, struct pkt_file *pfile)
+void _rtw_open_pktfile(_pkt *pktptr, struct pkt_file *pfile)
{
pfile->pkt = pktptr;
pfile->cur_addr = pfile->buf_start = pktptr->data;
pfile->pkt_len = pfile->buf_len = pktptr->len;
- pfile->cur_buffer = pfile->buf_start ;
+ pfile->cur_buffer = pfile->buf_start;
}
-uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen)
+uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen)
{
uint len = 0;
@@ -32,7 +31,7 @@ uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen)
len = (rlen > len) ? len : rlen;
if (rmem)
- skb_copy_bits(pfile->pkt, pfile->buf_len-pfile->pkt_len, rmem, len);
+ skb_copy_bits(pfile->pkt, pfile->buf_len - pfile->pkt_len, rmem, len);
pfile->cur_addr += len;
pfile->pkt_len -= len;
@@ -50,7 +49,7 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb
{
if (alloc_sz > 0) {
pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz);
- if (pxmitbuf->pallocated_buf == NULL)
+ if (!pxmitbuf->pallocated_buf)
return _FAIL;
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);
@@ -65,7 +64,7 @@ void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitb
kfree(pxmitbuf->pallocated_buf);
}
-#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5)
+#define WMM_XMIT_THRESHOLD (NR_XMITFRAME * 2 / 5)
void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt)
{
@@ -148,13 +147,13 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
/* free sta asoc_queue */
while (phead != plist) {
int stainfo_offset;
+
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist);
stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
- if (stainfo_offset_valid(stainfo_offset)) {
+ if (stainfo_offset_valid(stainfo_offset))
chk_alive_list[chk_alive_num++] = stainfo_offset;
- }
}
spin_unlock_bh(&pstapriv->asoc_list_lock);
@@ -229,9 +228,9 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
#endif
)
&& padapter->registrypriv.wifi_spec == 0) {
- if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME/4)) {
+ if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) {
res = rtw_mlcst2unicst(padapter, pkt);
- if (res == true)
+ if (res)
goto exit;
} else {
/* DBG_871X("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */
--
2.7.4
next reply other threads:[~2019-06-09 5:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-09 5:37 Hariprasad Kelam [this message]
2019-06-09 11:01 ` [PATCH] staging: rtl8723bs: fix indentation issues Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190609053741.GA12637@hari-Inspiron-1545 \
--to=hariprasad.kelam@gmail.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.