Message ID | 20200918102505.16036-1-zhengbin13@huawei.com |
---|---|
Headers | show |
Series | rtlwifi: fix comparison to bool warnings | expand |
On 9/18/20 5:24 AM, Zheng Bin wrote: > Fixes coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c:1106:14-18: WARNING: Comparison to bool > > Signed-off-by: Zheng Bin <zhengbin13@huawei.com> > --- > drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Larry > > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c > index fc6c81291cf5..6a3deca404b9 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c > @@ -1103,7 +1103,7 @@ static void _rtl92c_phy_path_adda_on(struct ieee80211_hw *hw, > u32 i; > > pathon = is_patha_on ? 0x04db25a4 : 0x0b1b25a4; > - if (false == is2t) { > + if (!is2t) { > pathon = 0x0bdb25a0; > rtl_set_bbreg(hw, addareg[0], MASKDWORD, 0x0b1b25a0); > } else { > -- > 2.26.0.106.g9fadedd >
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@huawei.com> > --- > drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.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/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 >
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 >
On 9/18/20 5:25 AM, Zheng Bin wrote: > Fixes coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:831:14-49: WARNING: Comparison to bool > > Signed-off-by: Zheng Bin <zhengbin13@huawei.com> > --- > drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Larry > > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c > index 3061bd81f39e..6312fddd9c00 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c > @@ -828,7 +828,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw) > ? WMM_CHIP_B_TX_PAGE_BOUNDARY > : WMM_CHIP_A_TX_PAGE_BOUNDARY; > } > - if (false == rtl92c_init_llt_table(hw, boundary)) { > + if (!rtl92c_init_llt_table(hw, boundary)) { > pr_err("Failed to init LLT Table!\n"); > return -EINVAL; > } > -- > 2.26.0.106.g9fadedd >