lkml.org 
[lkml]   [2020]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -next 7/9] rtlwifi: rtl8192ce: fix comparison to bool warning in hw.c
From
Date
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@huawei.com>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

Acked-by: Larry Finger <Larry.Finger@lwfinger.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
>

\
 
 \ /
  Last update: 2020-09-18 22:49    [W:0.100 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site