diff mbox series

[-next,5/9] rtlwifi: rtl8821ae: fix comparison to bool warning in phy.c

Message ID 20200918102505.16036-6-zhengbin13@huawei.com
State New
Headers show
Series None | expand

Commit Message

Zheng Bin Sept. 18, 2020, 10:25 a.m. UTC
Fixes coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1816:5-13: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1825:5-13: WARNING: Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1839:5-13: WARNING: Comparison to bool

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--
2.26.0.106.g9fadedd

Comments

Larry Finger Sept. 18, 2020, 8:48 p.m. UTC | #1
On 9/18/20 5:25 AM, Zheng Bin wrote:
> Fixes coccicheck warning:
> 
> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1816:5-13: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1825:5-13: WARNING: Comparison to bool
> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1839:5-13: WARNING: Comparison to bool
> 
> Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
> ---
>   drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Larry

> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> index 7832fae3d00f..38669b4d6190 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> @@ -1813,7 +1813,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
> 
>   	rtstatus = _rtl8821ae_phy_config_bb_with_headerfile(hw,
>   						       BASEBAND_CONFIG_PHY_REG);
> -	if (rtstatus != true) {
> +	if (!rtstatus) {
>   		pr_err("Write BB Reg Fail!!\n");
>   		return false;
>   	}
> @@ -1822,7 +1822,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
>   		rtstatus = _rtl8821ae_phy_config_bb_with_pgheaderfile(hw,
>   						    BASEBAND_CONFIG_PHY_REG);
>   	}
> -	if (rtstatus != true) {
> +	if (!rtstatus) {
>   		pr_err("BB_PG Reg Fail!!\n");
>   		return false;
>   	}
> @@ -1836,7 +1836,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
>   	rtstatus = _rtl8821ae_phy_config_bb_with_headerfile(hw,
>   						BASEBAND_CONFIG_AGC_TAB);
> 
> -	if (rtstatus != true) {
> +	if (!rtstatus) {
>   		pr_err("AGC Table Fail\n");
>   		return false;
>   	}
> --
> 2.26.0.106.g9fadedd
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 7832fae3d00f..38669b4d6190 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -1813,7 +1813,7 @@  static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)

 	rtstatus = _rtl8821ae_phy_config_bb_with_headerfile(hw,
 						       BASEBAND_CONFIG_PHY_REG);
-	if (rtstatus != true) {
+	if (!rtstatus) {
 		pr_err("Write BB Reg Fail!!\n");
 		return false;
 	}
@@ -1822,7 +1822,7 @@  static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
 		rtstatus = _rtl8821ae_phy_config_bb_with_pgheaderfile(hw,
 						    BASEBAND_CONFIG_PHY_REG);
 	}
-	if (rtstatus != true) {
+	if (!rtstatus) {
 		pr_err("BB_PG Reg Fail!!\n");
 		return false;
 	}
@@ -1836,7 +1836,7 @@  static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)
 	rtstatus = _rtl8821ae_phy_config_bb_with_headerfile(hw,
 						BASEBAND_CONFIG_AGC_TAB);

-	if (rtstatus != true) {
+	if (!rtstatus) {
 		pr_err("AGC Table Fail\n");
 		return false;
 	}