Re: [PATCH] staging: rtl8723bs: make rtw_register_tx_alive() return bool
From: Greg Kroah-Hartman
Date: Thu Oct 01 2026 - 05:46:56 EST
On Sat, Sep 26, 2026 at 11:11:25AM +0000, Hungyu Lin wrote:
> rtw_register_tx_alive() only reports whether the transmit path can
> continue, and its only caller treats the return value as a boolean.
>
> Change the return type to bool and replace _SUCCESS and _FAIL with true
> and false. Update the caller accordingly.
>
> No functional change.
>
> Signed-off-by: Hungyu Lin <dennylin0707@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 12 ++++++------
> drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 4 +---
> drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 2 +-
> 3 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> index 448611ad8237..007ead477a51 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> @@ -771,13 +771,13 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
> * _SUCCESS rtw_xmit_thread can write fifo/txcmd afterwards.
> * _FAIL rtw_xmit_thread can not do anything.
> */
> -s32 rtw_register_tx_alive(struct adapter *padapter)
> +bool rtw_register_tx_alive(struct adapter *padapter)
This is kind of the wrong way to do this as the caller of this function:
> - ret = rtw_register_tx_alive(padapter);
> - if (ret != _SUCCESS) {
> + if (!rtw_register_tx_alive(padapter))
> return _SUCCESS;
Is now in the "opposite" format for kernel functions, right?
Why not fall back to the normal 0 and -ERROR instead?
thanks,
greg k-h