]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8723bs: remove unused cnt from recv_func()
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 13 Sep 2024 00:28:14 +0000 (08:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Sep 2024 05:31:56 +0000 (07:31 +0200)
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>
drivers/staging/rtl8723bs/core/rtw_recv.c

index 7a95e15e641f2f0cfce29caaddf3cfc61659bdcf..b30f026789b684a4ff5f497dc3bcb7f8c984a829 100644 (file)
@@ -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);