[PATCH 25/61] staging: rtl8723bs: remove unregister_task_alive inline helper
From: Arsenii Pashchenko
Date: Wed Jul 15 2026 - 08:55:16 EST
Remove the redundant static inline helper unregister_task_alive()
from the power control management code.
The function provides no additional logic, validation, or locking,
acting merely as a wrapper around a standard bitwise AND-NOT operation
on the pwrctrl->alives bitmap. Replacing it with a direct expression
simplifies the driver's power interface.
Clean up the inline definition and update all its call sites across
the codebase to manipulate pwrctrl->alives directly.
Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index c52988cfc..a15f3ee9b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -667,11 +667,6 @@ static void pwr_rpwm_timeout_handler(struct timer_list *t)
_set_workitem(&pwrpriv->rpwmtimeoutwi);
}
-static inline void unregister_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
-{
- pwrctrl->alives &= ~tag;
-}
-
/*
* Description:
*Check if the fw_pwrstate is okay for I/O.
@@ -747,7 +742,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
mutex_lock(&pwrctrl->lock);
- unregister_task_alive(pwrctrl, task);
+ pwrctrl->alives &= task;
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->fw_current_in_ps_mode) {
if (pwrctrl->cpwm > pslv) {
@@ -874,7 +869,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
mutex_lock(&pwrctrl->lock);
- unregister_task_alive(pwrctrl, XMIT_ALIVE);
+ pwrctrl->alives &= XMIT_ALIVE;
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->fw_current_in_ps_mode) {
if (pwrctrl->cpwm > pslv)
@@ -910,7 +905,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
mutex_lock(&pwrctrl->lock);
- unregister_task_alive(pwrctrl, CMD_ALIVE);
+ pwrctrl->alives &= CMD_ALIVE;
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->fw_current_in_ps_mode) {
if (pwrctrl->cpwm > pslv) {
--
2.55.0