[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b23f4341-4b85-28be-49c7-8d1efdad20d3@lwfinger.net>
Date: Fri, 18 Sep 2020 15:49:00 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: Zheng Bin <zhengbin13@...wei.com>, pkshih@...ltek.com,
kvalo@...eaurora.org, davem@...emloft.net, kuba@...nel.org,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: yi.zhang@...wei.com
Subject: Re: [PATCH -next 7/9] rtlwifi: rtl8192ce: fix comparison to bool
warning in hw.c
On 9/18/20 5:25 AM, Zheng Bin wrote:
> Fixes coccicheck warning:
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:616:14-20: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:621:13-19: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:626:14-20: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:631:13-19: WARNING: Comparison to bool
>
> Signed-off-by: Zheng Bin <zhengbin13@...wei.com>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Acked-by: Larry Finger <Larry.Finger@...inger.net>
Larry
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
> index d4cd186036fd..bb5a0c4aec93 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
> @@ -613,22 +613,22 @@ static bool _rtl92ce_llt_table_init(struct ieee80211_hw *hw)
>
> for (i = 0; i < (txpktbuf_bndy - 1); i++) {
> status = _rtl92ce_llt_write(hw, i, i + 1);
> - if (true != status)
> + if (!status)
> return status;
> }
>
> status = _rtl92ce_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
> - if (true != status)
> + if (!status)
> return status;
>
> for (i = txpktbuf_bndy; i < maxpage; i++) {
> status = _rtl92ce_llt_write(hw, i, (i + 1));
> - if (true != status)
> + if (!status)
> return status;
> }
>
> status = _rtl92ce_llt_write(hw, maxpage, txpktbuf_bndy);
> - if (true != status)
> + if (!status)
> return status;
>
> return true;
> --
> 2.26.0.106.g9fadedd
>
Powered by blists - more mailing lists