From: Ethan Tidmore <ethantidmore06@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Straube <straube.linux@gmail.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Ethan Tidmore <ethantidmore06@gmail.com>
Subject: [PATCH v2 2/4] staging: rtl8723bs: remove dead RX FIFO overflow logic
Date: Tue, 27 Jan 2026 18:40:06 -0600 [thread overview]
Message-ID: <20260128004009.51095-3-ethantidmore06@gmail.com> (raw)
In-Reply-To: <20260128004009.51095-1-ethantidmore06@gmail.com>
The function rtw_hal_check_rxfifo_full() populates debug variables in
struct debug_priv that are never read. These variables (dbg_rx_fifo_*)
are write-only and the function itself is a skeletal implementation.
Additionally, remove a redundant hw_init_completed check in the caller
rtl8723b_HalDmWatchDog(), as it is already covered by a guard clause.
Removing this dead code saves unnecessary I/O cycles and cleans up
the driver's internal debug structures.
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 19 -------------------
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 7 -------
drivers/staging/rtl8723bs/include/hal_com.h | 1 -
3 files changed, 27 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 70b5b289f9cb..fae251c332d3 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -780,25 +780,6 @@ bool GetU1ByteIntegerFromStringInDecimal(char *Str, u8 *pInt)
return true;
}
-void rtw_hal_check_rxfifo_full(struct adapter *adapter)
-{
- struct dvobj_priv *psdpriv = adapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
- int save_cnt = false;
-
- /* switch counter to RX fifo */
- rtw_write8(adapter, REG_RXERR_RPT+3, rtw_read8(adapter, REG_RXERR_RPT+3)|0xf0);
- save_cnt = true;
- /* todo: other chips */
-
- if (save_cnt) {
- /* rtw_write8(adapter, REG_RXERR_RPT+3, rtw_read8(adapter, REG_RXERR_RPT+3)|0xa0); */
- pdbgpriv->dbg_rx_fifo_last_overflow = pdbgpriv->dbg_rx_fifo_curr_overflow;
- pdbgpriv->dbg_rx_fifo_curr_overflow = rtw_read16(adapter, REG_RXERR_RPT);
- pdbgpriv->dbg_rx_fifo_diff_overflow = pdbgpriv->dbg_rx_fifo_curr_overflow-pdbgpriv->dbg_rx_fifo_last_overflow;
- }
-}
-
static u32 Array_kfreemap[] = {
0xf8, 0xe,
0xf6, 0xc,
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
index 928226679ab4..3e1ec33fe829 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
@@ -137,13 +137,6 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
fw_current_in_ps_mode = adapter_to_pwrctl(Adapter)->fw_current_in_ps_mode;
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
- if (
- (hw_init_completed == true) &&
- ((!fw_current_in_ps_mode) && bFwPSAwake)
- ) {
- rtw_hal_check_rxfifo_full(Adapter);
- }
-
/* ODM */
if (hw_init_completed == true) {
u8 bLinked = false;
diff --git a/drivers/staging/rtl8723bs/include/hal_com.h b/drivers/staging/rtl8723bs/include/hal_com.h
index 74d6c892c401..24e7fd8ee4dc 100644
--- a/drivers/staging/rtl8723bs/include/hal_com.h
+++ b/drivers/staging/rtl8723bs/include/hal_com.h
@@ -136,7 +136,6 @@ void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *pst
void SetHwReg(struct adapter *padapter, u8 variable, u8 *val);
void GetHwReg(struct adapter *padapter, u8 variable, u8 *val);
-void rtw_hal_check_rxfifo_full(struct adapter *adapter);
u8 GetHalDefVar(struct adapter *adapter, enum hal_def_variable variable,
void *value);
--
2.52.0
next prev parent reply other threads:[~2026-01-28 0:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 0:40 [PATCH v2 0/4] staging: rtl8723bs: remove unused diagnostic Ethan Tidmore
2026-01-28 0:40 ` [PATCH v2 1/4] staging: rtl8723bs: remove dead RX info reset logic Ethan Tidmore
2026-01-28 0:40 ` Ethan Tidmore [this message]
2026-01-28 9:29 ` [PATCH v2 2/4] staging: rtl8723bs: remove dead RX FIFO overflow logic kernel test robot
2026-01-28 0:40 ` [PATCH v2 3/4] staging: rtl8723bs: remove dead RX sequence logic Ethan Tidmore
2026-01-28 0:40 ` [PATCH v2 4/4] staging: rtl8723bs: remove unused struct debug_priv and all counters Ethan Tidmore
2026-01-28 11:02 ` [PATCH v2 0/4] staging: rtl8723bs: remove unused diagnostic Greg Kroah-Hartman
2026-01-28 13:23 ` Dan Carpenter
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=20260128004009.51095-3-ethantidmore06@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
/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