From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-staging@lists.linux.dev>
Subject: [PATCH v2 3/4] staging: rtl8723bs: remove unused cnt from recv_func()
Date: Fri, 13 Sep 2024 08:28:14 +0800 [thread overview]
Message-ID: <20240913002815.5149-4-pkshih@realtek.com> (raw)
In-Reply-To: <20240913002815.5149-1-pkshih@realtek.com>
The 'cnt' is used to show how many pending frames are processed, and the
debug code has been removed, so removing 'cnt' is safe.
Otherwise, clang warns:
core/rtw_recv.c:2030:7: warning:
variable 'cnt' set but not used [-Wunused-but-set-variable]
2030 | int cnt = 0;
| ^
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/staging/rtl8723bs/core/rtw_recv.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 7a95e15e641f..b30f026789b6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -2026,12 +2026,9 @@ static int recv_func(struct adapter *padapter, union recv_frame *rframe)
/* check if need to handle uc_swdec_pending_queue*/
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) {
union recv_frame *pending_frame;
- int cnt = 0;
- while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) {
- cnt++;
+ while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue)))
recv_func_posthandle(padapter, pending_frame);
- }
}
ret = recv_func_prehandle(padapter, rframe);
--
2.25.1
next prev parent reply other threads:[~2024-09-13 0:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 0:28 [PATCH v2 0/4] staging: fix warning of -Wunused-but-set-variable reported by clang Ping-Ke Shih
2024-09-13 0:28 ` [PATCH v2 1/4] staging: rtl8712: remove unused drvinfo_sz from update_recvframe_attrib Ping-Ke Shih
2024-09-13 0:28 ` [PATCH v2 2/4] staging: rtl8723bs: remove unused efuseValue from efuse_OneByteWrite() Ping-Ke Shih
2024-09-13 0:28 ` Ping-Ke Shih [this message]
2024-09-13 0:28 ` [PATCH v2 4/4] staging: rtl8723bs: remove unused 'poll_cnt' from rtw_set_rpwm() Ping-Ke Shih
2024-09-13 4:48 ` [PATCH v2 0/4] staging: fix warning of -Wunused-but-set-variable reported by clang 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=20240913002815.5149-4-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-staging@lists.linux.dev \
/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