Re: [Outreachy kernel] [PATCH v3 4/4] staging: rtl8723bs: core: Change a controlling expression

From: Julia Lawall
Date: Sun Apr 11 2021 - 05:26:45 EST




On Sun, 11 Apr 2021, Fabio M. De Francesco wrote:

> Change a controlling expression within an 'if' statement: don't compare
> with 'true'.
>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
> ---
>
> Changes from v2: Rewrite subject in patch 0/4; remove a patch from the
> series because it had alreay been applied (rtl8723bs: core: Remove an unused variable).
> Changes from v1: Fix a typo in subject of patch 1/5, add patch 5/5.
>
> drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> index 32079e0f71d5..600366cb1aeb 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> @@ -1507,7 +1507,7 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
> if (pwrpriv->dtim != dtim)
> pwrpriv->dtim = dtim;
>
> - if ((pwrpriv->fw_current_in_ps_mode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
> + if ((pwrpriv->fw_current_in_ps_mode) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {

The parentheses in the left argument of && can be dropped as well.

julia

> u8 ps_mode = pwrpriv->pwr_mode;
>
> rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
> --
> 2.31.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@xxxxxxxxxxxxxxxx.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20210411082908.31876-5-fmdefrancesco%40gmail.com.
>