From: Kang Minchul <tegongkang@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Pavel Skripkin <paskripkin@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Kang Minchul <tegongkang@gmail.com>
Subject: [PATCH v3 2/4] staging: r8188eu: remove unnecessary vaiable in rtw_recv
Date: Wed, 26 Oct 2022 02:06:19 +0900 [thread overview]
Message-ID: <20221025170621.271903-3-tegongkang@gmail.com> (raw)
In-Reply-To: <20221025170621.271903-1-tegongkang@gmail.com>
Return _SUCCESS directly instead of storing it in a variable.
This can prevent cocci warning as follows:
Unneeded variable: "ret". Return "_SUCCESS" on line 1516
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
---
v2 -> v3: rollback to v1 because v2 caused error by kernel test robot
v1 -> v2: made amsdu_to_msdu into void function
drivers/staging/r8188eu/core/rtw_recv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index bb5c3b3888e0..9e98aea09583 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1415,7 +1415,6 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
struct recv_priv *precvpriv = &padapter->recvpriv;
struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue;
- int ret = _SUCCESS;
nr_subframes = 0;
@@ -1513,7 +1512,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
prframe->len = 0;
rtw_free_recvframe(prframe, pfree_recv_queue);/* free this recv_frame */
- return ret;
+ return _SUCCESS;
}
static bool check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
--
2.34.1
next prev parent reply other threads:[~2022-10-25 17:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 17:06 [PATCH v3 0/4] staging: r8188eu: cleaning up unused variables Kang Minchul
2022-10-25 17:06 ` [PATCH v3 1/4] staging: r8188eu: remove unnecessary variable in ioctl_linux Kang Minchul
2022-10-25 17:06 ` Kang Minchul [this message]
2022-10-25 17:06 ` [PATCH v3 3/4] staging: r8188eu: remove unnecessary variable in rtl8188eu_xmit Kang Minchul
2022-10-25 17:06 ` [PATCH v3 4/4] staging: r8188eu: make rtw_sta_flush to void Kang Minchul
2022-10-25 18:17 ` [PATCH v3 0/4] staging: r8188eu: cleaning up unused variables Philipp Hortmann
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=20221025170621.271903-3-tegongkang@gmail.com \
--to=tegongkang@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
/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®