staging: rtl8723au: Do not use comparisons on bool tests
authorRoberta Dobrescu <roberta.dobrescu@gmail.com>
Sun, 26 Oct 2014 21:30:05 +0000 (23:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 10:45:03 +0000 (18:45 +0800)
This patch removes unnecessary comparisons to bool.
It fixes the following warning detected using coccinelle tool:
WARNING: Comparison to bool.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_pwrctrl.c
drivers/staging/rtl8723au/core/rtw_wlan_util.c
drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/include/rtw_mlme.h

index 6a336cd2eb4d3b972ca656080e9b708e4c18e59d..d00255fbfcbc3b0d5bd088251a291a47a41428b8 100644 (file)
@@ -1605,7 +1605,7 @@ u8 ap_free_sta23a(struct rtw_adapter *padapter, struct sta_info *psta, bool acti
        if (!psta)
                return beacon_updated;
 
-       if (active == true) {
+       if (active) {
                /* tear down Rx AMPDU */
                send_delba23a(padapter, 0, psta->hwaddr);/*  recipient */
 
index 01b44a4364dc446f225b333e0773d5bf4e7c4723..424d96a1859ae61c48b1db0dd145c589768d5fab 100644 (file)
@@ -1149,7 +1149,7 @@ static void rtw_chk_hi_queue_hdl(struct rtw_adapter *padapter)
 
                val = rtl8723a_chk_hi_queue_empty(padapter);
 
-               while (val == false) {
+               while (!val) {
                        msleep(100);
 
                        cnt++;
index ba201300cc1f1b00772c65721658bb47dd1cb112..4e2b22d97101ee02e35ab392ee1660c21a53113d 100644 (file)
@@ -1121,7 +1121,7 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf)
                if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
                        /* s1. find ptarget_wlan */
                        if (check_fwstate(pmlmepriv, _FW_LINKED)) {
-                               if (the_same_macaddr == true) {
+                               if (the_same_macaddr) {
                                        ptarget_wlan = rtw_find_network23a(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
                                } else {
                                        pcur_wlan = rtw_find_network23a(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
index 10f8031e29cfc143cb0896041cb63b2364a7e73b..2624c778eff77a81be61d38b36010aac3d270887 100644 (file)
@@ -3999,7 +3999,7 @@ int send_beacon23a(struct rtw_adapter *padapter)
                        yield();
                        bxmitok = rtl8723a_get_bcn_valid(padapter);
                        poll++;
-               } while ((poll % 10) != 0 && bxmitok == false &&
+               } while ((poll % 10) != 0 && !bxmitok &&
                         !padapter->bSurpriseRemoved &&
                         !padapter->bDriverStopped);
 
index 1eae885c11703afa091fd742b0f30a97a5355b52..e2d51afe522c149862aababc5e0284fc9df66234 100644 (file)
@@ -159,7 +159,7 @@ void rtw_ps_processor23a(struct rtw_adapter *padapter)
        if (pwrpriv->ips_mode_req == IPS_NONE)
                goto exit;
 
-       if (rtw_pwr_unassociated_idle(padapter) == false)
+       if (!rtw_pwr_unassociated_idle(padapter))
                goto exit;
 
        if (pwrpriv->rf_pwrstate == rf_on &&
index c0325c96d616dae3d7df911439386e54c0b719d9..bc63d6f1773a0ba31a93ba43f219290ce1315171 100644 (file)
@@ -866,7 +866,7 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
        int pie_len, ssid_len, privacy;
        const u8 *p, *ssid;
 
-       if (is_client_associated_to_ap23a(Adapter) == false)
+       if (!is_client_associated_to_ap23a(Adapter))
                return _SUCCESS;
 
        if (unlikely(!ieee80211_is_beacon(mgmt->frame_control))) {
index 4b41bc4ce1e6d74a92564d4898e7c188e29c5735..179a1ba03029690bd4ca66d54c49b028e6e3fb46 100644 (file)
@@ -612,7 +612,7 @@ static void _PHY_PathADDAOn(struct rtw_adapter *pAdapter, u32 *ADDAReg, bool isP
        u32 i;
 
        pathOn = isPathAOn ? 0x04db25a4 : 0x0b1b25a4;
-       if (false == is2T) {
+       if (!is2T) {
                pathOn = 0x0bdb25a0;
                PHY_SetBBReg(pAdapter, ADDAReg[0], bMaskDWord, 0x0b1b25a0);
        } else {
index 8523908d5e5f021a451b28e06042147f3bdd07ff..1ccf60a9e528c6aa593a35a32c0dbecf795944aa 100644 (file)
@@ -1945,13 +1945,13 @@ Hal_EfuseParseThermalMeter_8723A(struct rtw_adapter *padapter,
        /*  */
        /*  ThermalMeter from EEPROM */
        /*  */
-       if (AutoloadFail == false)
+       if (!AutoloadFail)
                pHalData->EEPROMThermalMeter =
                    PROMContent[EEPROM_THERMAL_METER_8723A];
        else
                pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
 
-       if ((pHalData->EEPROMThermalMeter == 0xff) || (AutoloadFail == true)) {
+       if ((pHalData->EEPROMThermalMeter == 0xff) || AutoloadFail) {
                pHalData->bAPKThermalMeterIgnore = true;
                pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
        }
index 6c1dcf0b0d7ded4fbfa7791bdd7f7b01e7251d3d..adc2953fcaf4b59b9a7bc6cb86e4ea21a19ccbba 100644 (file)
@@ -480,7 +480,7 @@ static void _InitRFType(struct rtw_adapter *Adapter)
 
        pHalData->rf_chip = RF_6052;
 
-       if (is92CU == false) {
+       if (!is92CU) {
                pHalData->rf_type = RF_1T1R;
                DBG_8723A("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n");
                return;
index 2ff01eb8fc0c75d4d4a92109cc0e0b592fa849fb..a6751f138336de2c7eebf0b2dc51bf595bae62c5 100644 (file)
@@ -270,7 +270,7 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
 static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
 {
        spin_lock_bh(&pmlmepriv->lock);
-       if (check_fwstate(pmlmepriv, state) == true)
+       if (check_fwstate(pmlmepriv, state))
                pmlmepriv->fw_state ^= state;
        spin_unlock_bh(&pmlmepriv->lock);
 }