diff options
author | Joe Perches <joe@perches.com> | 2012-02-09 06:17:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-13 00:47:40 -0500 |
commit | 23677ce3172fcb93522a1df077d21019e73ee1e3 (patch) | |
tree | 9558b9c1f24d03d612f4bae999d453ae7ec637d6 /drivers/net/wireless/rtlwifi/rtl8192c | |
parent | 1a0d6ae5795c376bae6d012fb25e8341e4c6d5f2 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c index cb5535cf3ae2..a64473556ea8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | |||
@@ -329,8 +329,8 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw) | |||
329 | if (mac->opmode == NL80211_IFTYPE_ADHOC) | 329 | if (mac->opmode == NL80211_IFTYPE_ADHOC) |
330 | multi_sta = true; | 330 | multi_sta = true; |
331 | 331 | ||
332 | if ((multi_sta == false) || (dm_digtable.cursta_connectctate != | 332 | if (!multi_sta || |
333 | DIG_STA_DISCONNECT)) { | 333 | dm_digtable.cursta_connectctate != DIG_STA_DISCONNECT) { |
334 | initialized = false; | 334 | initialized = false; |
335 | dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; | 335 | dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; |
336 | return; | 336 | return; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c index 22e998dd2f32..bfff5fe8623c 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | |||
@@ -216,7 +216,7 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw) | |||
216 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "==>\n"); | 216 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "==>\n"); |
217 | rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw, | 217 | rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw, |
218 | BASEBAND_CONFIG_PHY_REG); | 218 | BASEBAND_CONFIG_PHY_REG); |
219 | if (rtstatus != true) { | 219 | if (!rtstatus) { |
220 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!\n"); | 220 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!\n"); |
221 | return false; | 221 | return false; |
222 | } | 222 | } |
@@ -229,13 +229,13 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw) | |||
229 | rtstatus = rtlpriv->cfg->ops->config_bb_with_pgheaderfile(hw, | 229 | rtstatus = rtlpriv->cfg->ops->config_bb_with_pgheaderfile(hw, |
230 | BASEBAND_CONFIG_PHY_REG); | 230 | BASEBAND_CONFIG_PHY_REG); |
231 | } | 231 | } |
232 | if (rtstatus != true) { | 232 | if (!rtstatus) { |
233 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "BB_PG Reg Fail!!\n"); | 233 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "BB_PG Reg Fail!!\n"); |
234 | return false; | 234 | return false; |
235 | } | 235 | } |
236 | rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw, | 236 | rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw, |
237 | BASEBAND_CONFIG_AGC_TAB); | 237 | BASEBAND_CONFIG_AGC_TAB); |
238 | if (rtstatus != true) { | 238 | if (!rtstatus) { |
239 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "AGC Table Fail\n"); | 239 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "AGC Table Fail\n"); |
240 | return false; | 240 | return false; |
241 | } | 241 | } |
@@ -580,7 +580,7 @@ void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel) | |||
580 | struct rtl_efuse *rtlefuse = rtl_efuse(rtlpriv); | 580 | struct rtl_efuse *rtlefuse = rtl_efuse(rtlpriv); |
581 | u8 cckpowerlevel[2], ofdmpowerlevel[2]; | 581 | u8 cckpowerlevel[2], ofdmpowerlevel[2]; |
582 | 582 | ||
583 | if (rtlefuse->txpwr_fromeprom == false) | 583 | if (!rtlefuse->txpwr_fromeprom) |
584 | return; | 584 | return; |
585 | _rtl92c_get_txpower_index(hw, channel, | 585 | _rtl92c_get_txpower_index(hw, channel, |
586 | &cckpowerlevel[0], &ofdmpowerlevel[0]); | 586 | &cckpowerlevel[0], &ofdmpowerlevel[0]); |