From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-staging@lists.linux.dev>
Subject: [PATCH v2 1/4] staging: rtl8712: remove unused drvinfo_sz from update_recvframe_attrib
Date: Fri, 13 Sep 2024 08:28:12 +0800 [thread overview]
Message-ID: <20240913002815.5149-2-pkshih@realtek.com> (raw)
In-Reply-To: <20240913002815.5149-1-pkshih@realtek.com>
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 <pkshih@realtek.com>
---
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
*/
--
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 ` Ping-Ke Shih [this message]
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 ` [PATCH v2 3/4] staging: rtl8723bs: remove unused cnt from recv_func() Ping-Ke Shih
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-2-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