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
@@ -329,8 +329,8 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw)
|
||||
if (mac->opmode == NL80211_IFTYPE_ADHOC)
|
||||
multi_sta = true;
|
||||
|
||||
if ((multi_sta == false) || (dm_digtable.cursta_connectctate !=
|
||||
DIG_STA_DISCONNECT)) {
|
||||
if (!multi_sta ||
|
||||
dm_digtable.cursta_connectctate != DIG_STA_DISCONNECT) {
|
||||
initialized = false;
|
||||
dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX;
|
||||
return;
|
||||
|
@@ -216,7 +216,7 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "==>\n");
|
||||
rtstatus = rtlpriv->cfg->ops->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;
|
||||
}
|
||||
@@ -229,13 +229,13 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
|
||||
rtstatus = rtlpriv->cfg->ops->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 = rtlpriv->cfg->ops->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;
|
||||
}
|
||||
@@ -580,7 +580,7 @@ void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
|
||||
struct rtl_efuse *rtlefuse = rtl_efuse(rtlpriv);
|
||||
u8 cckpowerlevel[2], ofdmpowerlevel[2];
|
||||
|
||||
if (rtlefuse->txpwr_fromeprom == false)
|
||||
if (!rtlefuse->txpwr_fromeprom)
|
||||
return;
|
||||
_rtl92c_get_txpower_index(hw, channel,
|
||||
&cckpowerlevel[0], &ofdmpowerlevel[0]);
|
||||
|
Reference in New Issue
Block a user