[PATCH 11/61] staging: rtl8723bs: inline rtw_ps_deny_get() and remove dead code

From: Arsenii Pashchenko

Date: Wed Jul 15 2026 - 08:53:20 EST


The function rtw_ps_deny_get() is a simple wrapper that returns the
ps_deny value. Replace its sole usage with direct access to the
structure member under the pwrctrl lock. Then, remove the now unused
function, its warning comment, and its declaration.

Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 12 +-----------
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 1 -
2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index b9f8cf101..1d6fe3734 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -139,7 +139,7 @@ void rtw_ps_processor(struct adapter *padapter)
u32 ps_deny = 0;

mutex_lock(&adapter_to_pwrctl(padapter)->lock);
- ps_deny = rtw_ps_deny_get(padapter);
+ ps_deny = adapter_to_pwrctl(padapter)->ps_deny;
mutex_unlock(&adapter_to_pwrctl(padapter)->lock);
if (ps_deny != 0)
goto exit;
@@ -1133,13 +1133,3 @@ void rtw_ps_deny_cancel(struct adapter *padapter, enum ps_deny_reason reason)
pwrpriv->ps_deny &= ~BIT(reason);
mutex_unlock(&pwrpriv->lock);
}
-
-/*
- * ATTENTION:
- *Before calling this function pwrctrl lock should be occupied already,
- *otherwise it may return incorrect value.
- */
-u32 rtw_ps_deny_get(struct adapter *padapter)
-{
- return adapter_to_pwrctl(padapter)->ps_deny;
-}
diff --git a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
index 6977892a5..9b6c42e4f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
@@ -249,6 +249,5 @@ int rtw_pm_set_lps(struct adapter *padapter, u8 mode);

void rtw_ps_deny(struct adapter *padapter, enum ps_deny_reason reason);
void rtw_ps_deny_cancel(struct adapter *padapter, enum ps_deny_reason reason);
-u32 rtw_ps_deny_get(struct adapter *padapter);

#endif /* __RTL871X_PWRCTRL_H_ */
--
2.55.0