Re: [PATCH] rtlwifi: Assign boolean values to a bool variable

From: Sebastian Andrzej Siewior
Date: Wed Jan 20 2021 - 04:14:59 EST


On 2021-01-20 15:27:08 [+0800], Jiapeng Zhong wrote:
> diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> index be4c0e6..c198222 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> @@ -873,7 +873,7 @@ static void halbtc_display_wifi_status(struct btc_coexist *btcoexist,
> dc_mode = true; /*TODO*/
> under_ips = rtlpriv->psc.inactive_pwrstate == ERFOFF ? 1 : 0;
> under_lps = rtlpriv->psc.dot11_psmode == EACTIVE ? 0 : 1;
> - low_power = 0; /*TODO*/
> + low_power = false; /*TODO*/

you could drop that assignment as it is already initialized to false at
the top.

> seq_printf(m, "\n %-35s = %s%s%s%s",
> "Power Status",
> (dc_mode ? "DC mode" : "AC mode"),

Sebastian