From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hariprasad Kelam <hariprasad.kelam@gmail.com>,
Josenivaldo Benito Jr <jrbenito@benito.qsl.br>,
Himadri Pandya <himadri18.07@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8723bs: hal: Remove return type of initrecvbuf
Date: Sat, 15 Jun 2019 22:52:20 +0530 [thread overview]
Message-ID: <20190615172220.GA6344@hari-Inspiron-1545> (raw)
change return of initrecvbuf from s32 to void. As this function always
returns SUCCESS .
fix checkpatch warning "Comparison to false is error prone"
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
index b269de5..e23b39a 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
@@ -10,14 +10,12 @@
#include <rtw_debug.h>
#include <rtl8723b_hal.h>
-static s32 initrecvbuf(struct recv_buf *precvbuf, struct adapter *padapter)
+static void initrecvbuf(struct recv_buf *precvbuf, struct adapter *padapter)
{
INIT_LIST_HEAD(&precvbuf->list);
spin_lock_init(&precvbuf->recvbuf_lock);
precvbuf->adapter = padapter;
-
- return _SUCCESS;
}
static void update_recvframe_attrib(struct adapter *padapter,
@@ -177,7 +175,7 @@ static void rtl8723bs_c2h_packet_handler(struct adapter *padapter,
res = rtw_c2h_packet_wk_cmd(padapter, tmp, length);
- if (res == false)
+ if (!res)
kfree(tmp);
/* DBG_871X("-%s res(%d)\n", __func__, res); */
@@ -435,9 +433,7 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter)
/* init each recv buffer */
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) {
- res = initrecvbuf(precvbuf, padapter);
- if (res == _FAIL)
- break;
+ initrecvbuf(precvbuf, padapter);
if (!precvbuf->pskb) {
SIZE_PTR tmpaddr = 0;
--
2.7.4
next reply other threads:[~2019-06-15 17:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-15 17:22 Hariprasad Kelam [this message]
2019-06-15 18:52 ` 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=20190615172220.GA6344@hari-Inspiron-1545 \
--to=hariprasad.kelam@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=himadri18.07@gmail.com \
--cc=jrbenito@benito.qsl.br \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®