From: Martin Kaiser Date: Mon, 9 Jan 2023 21:28:42 +0000 (+0100) Subject: staging: r8188eu: bkq_cnt is write-only X-Git-Tag: v6.6.17~5455^2~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b79601a0aa541862f2015f2727e12ed9ac82bbcb;p=platform%2Fkernel%2Flinux-rpi.git staging: r8188eu: bkq_cnt is write-only bkq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove bkq_cnt and resulting dead code. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 47b339b9a732..c06ab9b48db8 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -195,7 +195,6 @@ int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitpriv->txirp_cnt = 1; /* per AC pending irp */ - pxmitpriv->bkq_cnt = 0; pxmitpriv->viq_cnt = 0; pxmitpriv->voq_cnt = 0; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index a4d645a45ff9..8defce24c18b 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -283,7 +283,6 @@ struct xmit_priv { u8 txirp_cnt;/* */ struct tasklet_struct xmit_tasklet; /* per AC pending irp */ - int bkq_cnt; int viq_cnt; int voq_cnt; struct __queue free_xmitbuf_queue; diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 067b7def2bde..5ae09edf9174 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -48,9 +48,6 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) case VI_QUEUE_INX: pxmitpriv->viq_cnt--; break; - case BK_QUEUE_INX: - pxmitpriv->bkq_cnt--; - break; case HIGH_QUEUE_INX: rtw_chk_hi_queue_cmd(padapter); break; @@ -123,7 +120,6 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) pxmitbuf->flags = BE_QUEUE_INX; break; case BK_QUEUE_INX: - pxmitpriv->bkq_cnt++; pxmitbuf->flags = BK_QUEUE_INX; break; case HIGH_QUEUE_INX: