drivers/net: Remove boolean comparisons to true/false
Booleans should not be compared to true or false but be directly tested or tested with !. Done via cocci script: @@ bool t; @@ - t == true + t @@ bool t; @@ - t != true + !t @@ bool t; @@ - t == false + !t @@ bool t; @@ - t != false + t Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1a0d6ae579
commit
23677ce317
@@ -405,7 +405,7 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
|
||||
de_digtable.last_min_undecorated_pwdb_for_dm =
|
||||
de_digtable.min_undecorated_pwdb_for_dm;
|
||||
}
|
||||
if (rtlpriv->dm.dm_initialgain_enable == false)
|
||||
if (!rtlpriv->dm.dm_initialgain_enable)
|
||||
return;
|
||||
|
||||
/* because we will send data pkt when scanning
|
||||
|
@@ -707,7 +707,7 @@ static bool _rtl92de_init_mac(struct ieee80211_hw *hw)
|
||||
|
||||
/* System init */
|
||||
/* 18. LLT_table_init(Adapter); */
|
||||
if (_rtl92de_llt_table_init(hw) == false)
|
||||
if (!_rtl92de_llt_table_init(hw))
|
||||
return false;
|
||||
|
||||
/* Clear interrupt and enable interrupt */
|
||||
@@ -920,7 +920,7 @@ int rtl92de_hw_init(struct ieee80211_hw *hw)
|
||||
rtl92d_phy_reset_iqk_result(hw);
|
||||
/* rtlpriv->intf_ops->disable_aspm(hw); */
|
||||
rtstatus = _rtl92de_init_mac(hw);
|
||||
if (rtstatus != true) {
|
||||
if (!rtstatus) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
|
||||
err = 1;
|
||||
spin_unlock_irqrestore(&globalmutex_for_power_and_efuse, flags);
|
||||
@@ -1147,7 +1147,7 @@ void rtl92de_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
|
||||
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
|
||||
_rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(4));
|
||||
} else if (check_bssid == false) {
|
||||
} else if (!check_bssid) {
|
||||
reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN));
|
||||
_rtl92de_set_bcn_ctrl_reg(hw, BIT(4), 0);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
|
||||
@@ -2151,8 +2151,7 @@ bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
|
||||
e_rfpowerstate_toset = ERFON;
|
||||
ppsc->hwradiooff = false;
|
||||
actuallyset = true;
|
||||
} else if ((ppsc->hwradiooff == false)
|
||||
&& (e_rfpowerstate_toset == ERFOFF)) {
|
||||
} else if (!ppsc->hwradiooff && (e_rfpowerstate_toset == ERFOFF)) {
|
||||
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
|
||||
"GPIOChangeRF - HW Radio OFF, RF OFF\n");
|
||||
e_rfpowerstate_toset = ERFOFF;
|
||||
|
@@ -859,7 +859,7 @@ static bool _rtl92d_phy_bb_config(struct ieee80211_hw *hw)
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "==>\n");
|
||||
rtstatus = _rtl92d_phy_config_bb_with_headerfile(hw,
|
||||
BASEBAND_CONFIG_PHY_REG);
|
||||
if (rtstatus != true) {
|
||||
if (!rtstatus) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!\n");
|
||||
return false;
|
||||
}
|
||||
@@ -874,13 +874,13 @@ static bool _rtl92d_phy_bb_config(struct ieee80211_hw *hw)
|
||||
rtstatus = _rtl92d_phy_config_bb_with_pgheaderfile(hw,
|
||||
BASEBAND_CONFIG_PHY_REG);
|
||||
}
|
||||
if (rtstatus != true) {
|
||||
if (!rtstatus) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "BB_PG Reg Fail!!\n");
|
||||
return false;
|
||||
}
|
||||
rtstatus = _rtl92d_phy_config_bb_with_headerfile(hw,
|
||||
BASEBAND_CONFIG_AGC_TAB);
|
||||
if (rtstatus != true) {
|
||||
if (!rtstatus) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "AGC Table Fail\n");
|
||||
return false;
|
||||
}
|
||||
@@ -1129,7 +1129,7 @@ void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
u8 cckpowerlevel[2], ofdmpowerlevel[2];
|
||||
|
||||
if (rtlefuse->txpwr_fromeprom == false)
|
||||
if (!rtlefuse->txpwr_fromeprom)
|
||||
return;
|
||||
channel = _rtl92c_phy_get_rightchnlplace(channel);
|
||||
_rtl92d_get_txpower_index(hw, channel, &cckpowerlevel[0],
|
||||
@@ -3320,8 +3320,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
||||
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
|
||||
"IPS Set eRf nic enable\n");
|
||||
rtstatus = rtl_ps_enable_nic(hw);
|
||||
} while ((rtstatus != true) &&
|
||||
(InitializeCount < 10));
|
||||
} while (!rtstatus && (InitializeCount < 10));
|
||||
|
||||
RT_CLEAR_PS_LEVEL(ppsc,
|
||||
RT_RF_OFF_LEVL_HALT_NIC);
|
||||
|
@@ -601,7 +601,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
|
||||
u4_regvalue);
|
||||
break;
|
||||
}
|
||||
if (rtstatus != true) {
|
||||
if (!rtstatus) {
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
|
||||
"Radio[%d] Fail!!", rfpath);
|
||||
goto phy_rf_cfg_fail;
|
||||
|
Reference in New Issue
Block a user