From: Greg KH <gregkh@linuxfoundation.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH -next] staging: rtl8723bs: os_dep: remove unused variable 'ret'
Date: Wed, 31 Mar 2021 12:27:51 +0200 [thread overview]
Message-ID: <YGROp83Mnf8hGjY4@kroah.com> (raw)
In-Reply-To: <20210331094247.2169606-1-yangyingliang@huawei.com>
On Wed, Mar 31, 2021 at 05:42:47PM +0800, Yang Yingliang wrote:
> GCC reports the following warning with W=1:
>
> drivers/staging/rtl8723bs/os_dep/recv_linux.c:101:6: warning:
> variable ‘ret’ set but not used [-Wunused-but-set-variable]
> 101 | int ret;
> | ^~~
>
> This variable is not used in function , this commit
> remove it to fix the warning.
>
> Fixes: de69e2b3f105 ("staging: rtl8723bs: remove DBG_COUNTER calls from os_dep/recv_linux.c")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/staging/rtl8723bs/os_dep/recv_linux.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
> index fbdbcd04d44a..f6a9482be8e3 100644
> --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
> @@ -98,7 +98,6 @@ struct sk_buff *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_L
> void rtw_os_recv_indicate_pkt(struct adapter *padapter, struct sk_buff *pkt, struct rx_pkt_attrib *pattrib)
> {
> struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> - int ret;
>
> /* Indicate the packets to upper layer */
> if (pkt) {
> @@ -140,7 +139,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, struct sk_buff *pkt, str
>
> pkt->ip_summed = CHECKSUM_NONE;
>
> - ret = rtw_netif_rx(padapter->pnetdev, pkt);
> + rtw_netif_rx(padapter->pnetdev, pkt);
Why not handle the result of this call properly?
next prev parent reply other threads:[~2021-03-31 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 9:42 [PATCH -next] staging: rtl8723bs: os_dep: remove unused variable 'ret' Yang Yingliang
2021-03-31 10:27 ` Greg KH [this message]
2021-04-01 2:35 ` Yang Yingliang
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=YGROp83Mnf8hGjY4@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=yangyingliang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox