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 <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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
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 <[email protected]>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Acked-by: Larry Finger <[email protected]>
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
>