From bfa0290f4fc4c84e1283077eecd44147ec27a8c9 Mon Sep 17 00:00:00 2001 From: Ping-Ke Shih Date: Fri, 13 Sep 2024 08:28:12 +0800 Subject: [PATCH] staging: rtl8712: remove unused drvinfo_sz from update_recvframe_attrib The drvinfo_sz is a size of hardware generated data putting in front of real RX data. The functions r8712_rxcmd_event_hdl() and recvbuf2recvframe() have its own parsing code to get drvinfo_sz to access real RX data, so removing this unused drvinfo_sz is safe. Otherwise, clang report: rtl8712_recv.c:139:6: warning: variable 'drvinfo_sz' set but not used [-Wunused-but-set-variable] 139 | u16 drvinfo_sz; | ^ Signed-off-by: Ping-Ke Shih Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240913002815.5149-2-pkshih@realtek.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/rtl8712_recv.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index 1fabc5137a4c..ab344d676bb9 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -136,10 +136,6 @@ void r8712_free_recvframe(union recv_frame *precvframe, static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib, struct recv_stat *prxstat) { - u16 drvinfo_sz; - - drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16; - drvinfo_sz <<= 3; /*TODO: * Offset 0 */