]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
rtlwifi: rtl8192de: Remove comparison of boolean with true
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 30 Jun 2011 21:47:11 +0000 (16:47 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Jul 2011 19:26:54 +0000 (15:26 -0400)
Tests of a boolean against "true" are not needed as non-zero is sufficient..

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/rtl8192de/hw.c
drivers/net/wireless/rtlwifi/rtl8192de/led.c
drivers/net/wireless/rtlwifi/rtl8192de/rf.c
drivers/net/wireless/rtlwifi/rtl8192de/trx.c

index 270571a1971faebbf7866cccf99eafc9bb623493..5c84131f62e5b3637a6a886a9cd8a79955a5f911 100644 (file)
@@ -449,7 +449,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
        case HW_VAR_CORRECT_TSF: {
                u8 btype_ibss = ((u8 *) (val))[0];
 
-               if (btype_ibss == true)
+               if (btype_ibss)
                        _rtl92de_stop_tx_beacon(hw);
                _rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(3));
                rtl_write_dword(rtlpriv, REG_TSFTR,
@@ -457,7 +457,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
                rtl_write_dword(rtlpriv, REG_TSFTR + 4,
                                (u32) ((mac->tsf >> 32) & 0xffffffff));
                _rtl92de_set_bcn_ctrl_reg(hw, BIT(3), 0);
-               if (btype_ibss == true)
+               if (btype_ibss)
                        _rtl92de_resume_tx_beacon(hw);
 
                break;
@@ -1142,7 +1142,7 @@ void rtl92de_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
 
        if (rtlpriv->psc.rfpwr_state != ERFON)
                return;
-       if (check_bssid == true) {
+       if (check_bssid) {
                reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
                rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(&reg_rcr));
                _rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(4));
@@ -1785,7 +1785,7 @@ static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
                RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("Autoload OK\n"));
                rtlefuse->autoload_failflag = false;
        }
-       if (rtlefuse->autoload_failflag == true) {
+       if (rtlefuse->autoload_failflag) {
                RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
                         ("RTL819X Not boot from eeprom, check it !!"));
                return;
@@ -2147,7 +2147,7 @@ bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
                          REG_MAC_PINMUX_CFG) & ~(BIT(3)));
        u1tmp = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL);
        e_rfpowerstate_toset = (u1tmp & BIT(3)) ? ERFON : ERFOFF;
-       if ((ppsc->hwradiooff == true) && (e_rfpowerstate_toset == ERFON)) {
+       if (ppsc->hwradiooff && (e_rfpowerstate_toset == ERFON)) {
                RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
                         ("GPIOChangeRF  - HW Radio ON, RF ON\n"));
                e_rfpowerstate_toset = ERFON;
index 719972c16fcc64f326fecd0b12d88ae062c478e2..f1552f4df65805aea48848d402c6d71e2188395a 100644 (file)
@@ -93,7 +93,7 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
                break;
        case LED_PIN_LED0:
                ledcfg &= 0xf0;
-               if (pcipriv->ledctl.led_opendrain == true)
+               if (pcipriv->ledctl.led_opendrain)
                        rtl_write_byte(rtlpriv, REG_LEDCFG2,
                                       (ledcfg | BIT(1) | BIT(5) | BIT(6)));
                else
index c326372220f3c986fe9bc3146d730aaa9918e0b3..db27cebaac2c80052a0479992c88ebfa25017896 100644 (file)
@@ -87,7 +87,7 @@ void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
 
        if (rtlefuse->eeprom_regulatory != 0)
                turbo_scanoff = true;
-       if (mac->act_scanning == true) {
+       if (mac->act_scanning) {
                tx_agc[RF90_PATH_A] = 0x3f3f3f3f;
                tx_agc[RF90_PATH_B] = 0x3f3f3f3f;
                if (turbo_scanoff) {
@@ -416,9 +416,9 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0)
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_hal *rtlhal = &(rtlpriv->rtlhal);
        u8 u1btmp;
-       u8 direct = bmac0 == true ? BIT(3) | BIT(2) : BIT(3);
-       u8 mac_reg = bmac0 == true ? REG_MAC1 : REG_MAC0;
-       u8 mac_on_bit = bmac0 == true ? MAC1_ON : MAC0_ON;
+       u8 direct = bmac0 ? BIT(3) | BIT(2) : BIT(3);
+       u8 mac_reg = bmac0 ? REG_MAC1 : REG_MAC0;
+       u8 mac_on_bit = bmac0 ? MAC1_ON : MAC0_ON;
        bool bresult = true; /* true: need to enable BB/RF power */
 
        rtlhal->during_mac0init_radiob = false;
@@ -447,9 +447,9 @@ void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0)
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_hal *rtlhal = &(rtlpriv->rtlhal);
        u8 u1btmp;
-       u8 direct = bmac0 == true ? BIT(3) | BIT(2) : BIT(3);
-       u8 mac_reg = bmac0 == true ? REG_MAC1 : REG_MAC0;
-       u8 mac_on_bit = bmac0 == true ? MAC1_ON : MAC0_ON;
+       u8 direct = bmac0 ? BIT(3) | BIT(2) : BIT(3);
+       u8 mac_reg = bmac0 ? REG_MAC1 : REG_MAC0;
+       u8 mac_on_bit = bmac0 ? MAC1_ON : MAC0_ON;
 
        rtlhal->during_mac0init_radiob = false;
        rtlhal->during_mac1init_radioa = false;
@@ -573,7 +573,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
                udelay(1);
                switch (rfpath) {
                case RF90_PATH_A:
-                       if (true_bpath == true)
+                       if (true_bpath)
                                rtstatus = rtl92d_phy_config_rf_with_headerfile(
                                                hw, radiob_txt,
                                                (enum radio_path)rfpath);
index bf1462f69b52ca30afef5b3b2f9ceb718268b0c0..dc86fcb0b3a3fb90895629405e7e9d89454c1038 100644 (file)
@@ -614,7 +614,7 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
                                                    (u8)
                                                    GET_RX_DESC_RXMCS(pdesc));
        rx_status->mactime = GET_RX_DESC_TSFL(pdesc);
-       if (phystatus == true) {
+       if (phystatus) {
                p_drvinfo = (struct rx_fwinfo_92d *)(skb->data +
                                                     stats->rx_bufshift);
                _rtl92de_translate_rx_signal_stuff(hw,
@@ -876,7 +876,7 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw,
 
 void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
 {
-       if (istx == true) {
+       if (istx) {
                switch (desc_name) {
                case HW_DESC_OWN:
                        wmb();
@@ -917,7 +917,7 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name)
 {
        u32 ret = 0;
 
-       if (istx == true) {
+       if (istx) {
                switch (desc_name) {
                case HW_DESC_OWN:
                        ret = GET_TX_DESC_OWN(p_desc);