[PATCH 24/61] staging: rtl8723bs: remove register_task_alive inline helper

From: Arsenii Pashchenko

Date: Wed Jul 15 2026 - 08:59:38 EST


Remove the redundant static inline helper register_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 OR 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 1d6fe3734..c52988cfc 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 register_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
-{
- pwrctrl->alives |= tag;
-}
-
static inline void unregister_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
{
pwrctrl->alives &= ~tag;
@@ -704,7 +699,7 @@ s32 rtw_register_task_alive(struct adapter *padapter, u32 task)

mutex_lock(&pwrctrl->lock);

- register_task_alive(pwrctrl, task);
+ pwrctrl->alives |= task;

if (pwrctrl->fw_current_in_ps_mode) {
if (pwrctrl->cpwm < pslv) {
@@ -789,7 +784,7 @@ s32 rtw_register_tx_alive(struct adapter *padapter)

mutex_lock(&pwrctrl->lock);

- register_task_alive(pwrctrl, XMIT_ALIVE);
+ pwrctrl->alives |= XMIT_ALIVE;

if (pwrctrl->fw_current_in_ps_mode) {
if (pwrctrl->cpwm < pslv) {
@@ -834,7 +829,7 @@ s32 rtw_register_cmd_alive(struct adapter *padapter)

mutex_lock(&pwrctrl->lock);

- register_task_alive(pwrctrl, CMD_ALIVE);
+ pwrctrl->alives |= CMD_ALIVE;

if (pwrctrl->fw_current_in_ps_mode) {
if (pwrctrl->cpwm < pslv) {
--
2.55.0