Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1114488pxk; Thu, 10 Sep 2020 07:25:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzib5DovfRHHLnASNsUBAB0d8GeLRx7JLwCSzjIzickln9IY7BDg1xZMQZQWSkMOw/hO5Vf X-Received: by 2002:a17:906:a2d9:: with SMTP id by25mr9359734ejb.326.1599747947601; Thu, 10 Sep 2020 07:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599747947; cv=none; d=google.com; s=arc-20160816; b=ytAMhpoFlVkg18fi3emUmMBUu8FDnNcFgtlcWXwvte2QjtSX4fp9QS4WAXWKXO6GIE HnTRadiuj06H3JaFA2GRUgdltEIAsxRlbEt2m70lbEpQBlnZmKmEU9FoMX3tFi8ff2zv DUL7ITH71nNsiP+Cpw7i9ESXjIw7lAn0nHHtJVJRS4Nbr3eK8qCHIn9GjePagHapU2C+ 05JVKDS2mxyA/MhNZHeEya0g4/OKOeAAmCTZ32LIBut9QuaWcIH8wgZEqouK0x2Ckb6L PXvPmys6MkAse4xhbheuNyKgOMCCGAoAWB5HvZL9F9I3eVcvdBimq/tpJnbsz1tu9Aoz 6rdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=55r8OO9lfLOrXQnPKKBZCPAhAxp3U/xtsZW0966yaMQ=; b=0AnOJ7lD2xX/7YKtQSdKZU40VwjWzfOR6I+6IsPfxzCJFT4/hFP/O9cHHcLp7Sgnw4 +AdY7pVpAmGeL8ZEmt3WuI6sBnVwi21a3r2KiUFPInBw0D8UJe6bCY50KBxmOe5xgP4U 7OfKD1V3JOHeQ1U/UtTlSdyA72WO9rj8UX8uyrS33dyJIuJElEHpe26hkBl6ynhENgFZ B/RcZrZaP+g8Ed6OlERo6plWH80QVq5/23B76x5OacwhM9UeuSYXXWdmWWCgW87gbZRX NroFlJcqvm/y/1xdgGAfJYMbXNj0VwLMB3qqPNRRCzlA60o5JyZg8W6LXRqQH12DJGbO hD/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si3614471eju.153.2020.09.10.07.25.11; Thu, 10 Sep 2020 07:25:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731113AbgIJOYG (ORCPT + 99 others); Thu, 10 Sep 2020 10:24:06 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:56932 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730434AbgIJOK1 (ORCPT ); Thu, 10 Sep 2020 10:10:27 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 911E06F8FFDF841198DC; Thu, 10 Sep 2020 22:09:57 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Thu, 10 Sep 2020 22:09:48 +0800 From: Zheng Bin To: , , , , , , CC: , Subject: [PATCH -next 3/3] rtlwifi: rtl8723ae: fix comparison pointer to bool warning in phy.c Date: Thu, 10 Sep 2020 22:16:42 +0800 Message-ID: <20200910141642.127006-4-zhengbin13@huawei.com> X-Mailer: git-send-email 2.26.0.106.g9fadedd In-Reply-To: <20200910141642.127006-1-zhengbin13@huawei.com> References: <20200910141642.127006-1-zhengbin13@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:191:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:205:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:211:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:625:5-30: WARNING: Comparison to bool Signed-off-by: Zheng Bin --- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c index 5ba645bc46dc..fa0eed434d4f 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c @@ -188,7 +188,7 @@ static bool _rtl8723e_phy_bb8192c_config_parafile(struct ieee80211_hw *hw) rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "\n"); rtstatus = _rtl8723e_phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_PHY_REG); - if (rtstatus != true) { + if (!rtstatus) { pr_err("Write BB Reg Fail!!\n"); return false; } @@ -202,13 +202,13 @@ static bool _rtl8723e_phy_bb8192c_config_parafile(struct ieee80211_hw *hw) rtstatus = _rtl8723e_phy_config_bb_with_pgheaderfile(hw, BASEBAND_CONFIG_PHY_REG); } - if (rtstatus != true) { + if (!rtstatus) { pr_err("BB_PG Reg Fail!!\n"); return false; } rtstatus = _rtl8723e_phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_AGC_TAB); - if (rtstatus != true) { + if (!rtstatus) { pr_err("AGC Table Fail\n"); return false; } @@ -622,7 +622,7 @@ void rtl8723e_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel) struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); u8 cckpowerlevel[2], ofdmpowerlevel[2]; - if (rtlefuse->txpwr_fromeprom == false) + if (!rtlefuse->txpwr_fromeprom) return; _rtl8723e_get_txpower_index(hw, channel, &cckpowerlevel[0], &ofdmpowerlevel[0]); -- 2.26.0.106.g9fadedd