From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-staging@lists.linux.dev>
Subject: [PATCH v2 2/4] staging: rtl8723bs: remove unused efuseValue from efuse_OneByteWrite()
Date: Fri, 13 Sep 2024 08:28:13 +0800 [thread overview]
Message-ID: <20240913002815.5149-3-pkshih@realtek.com> (raw)
In-Reply-To: <20240913002815.5149-1-pkshih@realtek.com>
The efuseValue is to store value from register EFUSE_CTRL, and set control
bits including address and write bit. This is no need for RTL8723BS, so
the consumer has been removed. Thus, remove these unused codes are safe.
Otherwiese, clang warns:
rtw_efuse.c:285:6: warning:
variable 'efuseValue' set but not used [-Wunused-but-set-variable]
285 | u32 efuseValue;
| ^
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/staging/rtl8723bs/core/rtw_efuse.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index 6419638c6e20..8b671f8a7965 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -281,22 +281,13 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
{
u8 tmpidx = 0;
u8 bResult = false;
- u32 efuseValue;
if (bPseudoTest)
return Efuse_Write1ByteToFakeContent(addr, data);
-
/* -----------------e-fuse reg ctrl --------------------------------- */
/* address */
-
- efuseValue = rtw_read32(padapter, EFUSE_CTRL);
- efuseValue |= (BIT21 | BIT31);
- efuseValue &= ~(0x3FFFF);
- efuseValue |= ((addr << 8 | data) & 0x3FFFF);
-
-
/* <20130227, Kordan> 8192E MP chip A-cut had better not set 0x34[11] until B-Cut. */
/* <20130121, Kordan> For SMIC EFUSE specificatoin. */
--
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 ` [PATCH v2 1/4] staging: rtl8712: remove unused drvinfo_sz from update_recvframe_attrib Ping-Ke Shih
2024-09-13 0:28 ` Ping-Ke Shih [this message]
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-3-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