linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Zheng Bin <zhengbin13@huawei.com>,
	pkshih@realtek.com, kvalo@codeaurora.org, davem@davemloft.net,
	kuba@kernel.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: yi.zhang@huawei.com
Subject: Re: [PATCH -next 8/9] rtlwifi: rtl8192de: fix comparison to bool warning in hw.c
Date: Fri, 18 Sep 2020 15:49:25 -0500	[thread overview]
Message-ID: <72b79a89-193b-b087-c6fd-6a529c98be06@lwfinger.net> (raw)
In-Reply-To: <20200918102505.16036-9-zhengbin13@huawei.com>

On 9/18/20 5:25 AM, Zheng Bin wrote:
> Fixes coccicheck warning:
> 
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:566:14-20: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:572:13-19: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:581:14-20: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:587:13-19: WARNING: Comparison to bool
> 
> Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
> ---
>   drivers/net/wireless/realtek/rtlwifi/rtl8192de/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/rtl8192de/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
> index 2deadc7339ce..f849291cc587 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
> @@ -563,13 +563,13 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
>   	/* 18.  LLT_table_init(Adapter);  */
>   	for (i = 0; i < (txpktbuf_bndy - 1); i++) {
>   		status = _rtl92de_llt_write(hw, i, i + 1);
> -		if (true != status)
> +		if (!status)
>   			return status;
>   	}
> 
>   	/* end of list */
>   	status = _rtl92de_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
> -	if (true != status)
> +	if (!status)
>   		return status;
> 
>   	/* Make the other pages as ring buffer */
> @@ -578,13 +578,13 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
>   	/* Otherwise used as local loopback buffer.  */
>   	for (i = txpktbuf_bndy; i < maxpage; i++) {
>   		status = _rtl92de_llt_write(hw, i, (i + 1));
> -		if (true != status)
> +		if (!status)
>   			return status;
>   	}
> 
>   	/* Let last entry point to the start entry of ring buffer */
>   	status = _rtl92de_llt_write(hw, maxpage, txpktbuf_bndy);
> -	if (true != status)
> +	if (!status)
>   		return status;
> 
>   	return true;
> --
> 2.26.0.106.g9fadedd
> 


  reply	other threads:[~2020-09-18 20:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 10:24 [PATCH -next 0/9] rtlwifi: fix comparison to bool warnings Zheng Bin
2020-09-18 10:24 ` [PATCH -next 1/9] rtlwifi: rtl8192ee: fix comparison to bool warning in hw.c Zheng Bin
2020-09-21 13:03   ` Kalle Valo
2020-09-18 10:24 ` [PATCH -next 2/9] rtlwifi: rtl8192c: fix comparison to bool warning in phy_common.c Zheng Bin
2020-09-18 20:47   ` Larry Finger
2020-09-18 10:24 ` [PATCH -next 3/9] rtlwifi: rtl8192cu: fix comparison to bool warning in mac.c Zheng Bin
2020-09-18 20:47   ` Larry Finger
2020-09-18 10:25 ` [PATCH -next 4/9] rtlwifi: rtl8821ae: fix comparison to bool warning in hw.c Zheng Bin
2020-09-18 20:47   ` Larry Finger
2020-09-18 10:25 ` [PATCH -next 5/9] rtlwifi: rtl8821ae: fix comparison to bool warning in phy.c Zheng Bin
2020-09-18 20:48   ` Larry Finger
2020-09-18 10:25 ` [PATCH -next 6/9] rtlwifi: rtl8192cu: fix comparison to bool warning in hw.c Zheng Bin
2020-09-18 20:48   ` Larry Finger
2020-09-18 10:25 ` [PATCH -next 7/9] rtlwifi: rtl8192ce: " Zheng Bin
2020-09-18 20:49   ` Larry Finger
2020-09-18 10:25 ` [PATCH -next 8/9] rtlwifi: rtl8192de: " Zheng Bin
2020-09-18 20:49   ` Larry Finger [this message]
2020-09-18 10:25 ` [PATCH -next 9/9] rtlwifi: rtl8723be: " Zheng Bin
2020-09-18 20:49   ` Larry Finger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72b79a89-193b-b087-c6fd-6a529c98be06@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=yi.zhang@huawei.com \
    --cc=zhengbin13@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).