[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6dec9a5-4778-6e57-4be7-3c998482140a@lwfinger.net>
Date: Fri, 18 Sep 2020 15:47:39 -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 3/9] rtlwifi: rtl8192cu: fix comparison to bool
warning in mac.c
On 9/18/20 5:24 AM, Zheng Bin wrote:
> Fixes coccicheck warning:
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:161:14-17: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:168:13-16: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:179:14-17: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:186:13-16: WARNING: Comparison to bool
>
> Signed-off-by: Zheng Bin <zhengbin13@...wei.com>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.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/rtl8192cu/mac.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
> index d7afb6a186df..2890a495a23e 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
> @@ -158,14 +158,14 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary)
>
> for (i = 0; i < (boundary - 1); i++) {
> rst = rtl92c_llt_write(hw, i , i + 1);
> - if (true != rst) {
> + if (!rst) {
> pr_err("===> %s #1 fail\n", __func__);
> return rst;
> }
> }
> /* end of list */
> rst = rtl92c_llt_write(hw, (boundary - 1), 0xFF);
> - if (true != rst) {
> + if (!rst) {
> pr_err("===> %s #2 fail\n", __func__);
> return rst;
> }
> @@ -176,14 +176,14 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary)
> */
> for (i = boundary; i < LLT_LAST_ENTRY_OF_TX_PKT_BUFFER; i++) {
> rst = rtl92c_llt_write(hw, i, (i + 1));
> - if (true != rst) {
> + if (!rst) {
> pr_err("===> %s #3 fail\n", __func__);
> return rst;
> }
> }
> /* Let last entry point to the start entry of ring buffer */
> rst = rtl92c_llt_write(hw, LLT_LAST_ENTRY_OF_TX_PKT_BUFFER, boundary);
> - if (true != rst) {
> + if (!rst) {
> pr_err("===> %s #4 fail\n", __func__);
> return rst;
> }
> --
> 2.26.0.106.g9fadedd
>
Powered by blists - more mailing lists