Skip to content

Commit 0b4d1ed

Browse files
Ping-Ke Shihgregkh
authored andcommitted
staging: rtl8723bs: remove unused cnt from recv_func()
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> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240913002815.5149-4-pkshih@realtek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent aa947d7 commit 0b4d1ed

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/staging/rtl8723bs/core/rtw_recv.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,12 +2026,9 @@ static int recv_func(struct adapter *padapter, union recv_frame *rframe)
20262026
/* check if need to handle uc_swdec_pending_queue*/
20272027
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) {
20282028
union recv_frame *pending_frame;
2029-
int cnt = 0;
20302029

2031-
while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) {
2032-
cnt++;
2030+
while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue)))
20332031
recv_func_posthandle(padapter, pending_frame);
2034-
}
20352032
}
20362033

20372034
ret = recv_func_prehandle(padapter, rframe);

0 commit comments

Comments
 (0)