Re: [PATCH] staging: rtl8723bs: simplify condition in rtw_btcoex_MediaStatusNotify
From: Greg KH
Date: Thu Mar 19 2026 - 04:00:05 EST
On Thu, Mar 19, 2026 at 03:40:07PM +0800, Zile Xiong wrote:
> Remove redundant parentheses and unnecessary comparison to true
> in the conditional expression to improve readability.
>
> No functional change.
>
> Signed-off-by: Zile Xiong <xiongzile99@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> index f4b19ef7b341..b19eab0afba3 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> @@ -10,10 +10,8 @@
>
> void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
> {
> - if ((media_status == RT_MEDIA_CONNECT)
> - && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
> + if (media_status == RT_MEDIA_CONNECT && check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE))
Please no, now you need to remember that == takes precidence over &&.
> rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
> - }
You also did two different things here in the same change, which isn't
alowed for staging patches.
thanks,
greg k-h