Commit 08551cbb authored by Roberta Dobrescu's avatar Roberta Dobrescu Committed by Greg Kroah-Hartman

staging: rtl8723au: Do not use comparisons on bool tests

This patch removes unnecessary comparisons to bool.
It fixes the following warning detected using coccinelle tool:
WARNING: Comparison to bool.
Signed-off-by: default avatarRoberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent de1de2f6
...@@ -1605,7 +1605,7 @@ u8 ap_free_sta23a(struct rtw_adapter *padapter, struct sta_info *psta, bool acti ...@@ -1605,7 +1605,7 @@ u8 ap_free_sta23a(struct rtw_adapter *padapter, struct sta_info *psta, bool acti
if (!psta) if (!psta)
return beacon_updated; return beacon_updated;
if (active == true) { if (active) {
/* tear down Rx AMPDU */ /* tear down Rx AMPDU */
send_delba23a(padapter, 0, psta->hwaddr);/* recipient */ send_delba23a(padapter, 0, psta->hwaddr);/* recipient */
......
...@@ -1149,7 +1149,7 @@ static void rtw_chk_hi_queue_hdl(struct rtw_adapter *padapter) ...@@ -1149,7 +1149,7 @@ static void rtw_chk_hi_queue_hdl(struct rtw_adapter *padapter)
val = rtl8723a_chk_hi_queue_empty(padapter); val = rtl8723a_chk_hi_queue_empty(padapter);
while (val == false) { while (!val) {
msleep(100); msleep(100);
cnt++; cnt++;
......
...@@ -1121,7 +1121,7 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf) ...@@ -1121,7 +1121,7 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf)
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) { if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
/* s1. find ptarget_wlan */ /* s1. find ptarget_wlan */
if (check_fwstate(pmlmepriv, _FW_LINKED)) { 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); ptarget_wlan = rtw_find_network23a(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
} else { } else {
pcur_wlan = rtw_find_network23a(&pmlmepriv->scanned_queue, cur_network->network.MacAddress); pcur_wlan = rtw_find_network23a(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
......
...@@ -3999,7 +3999,7 @@ int send_beacon23a(struct rtw_adapter *padapter) ...@@ -3999,7 +3999,7 @@ int send_beacon23a(struct rtw_adapter *padapter)
yield(); yield();
bxmitok = rtl8723a_get_bcn_valid(padapter); bxmitok = rtl8723a_get_bcn_valid(padapter);
poll++; poll++;
} while ((poll % 10) != 0 && bxmitok == false && } while ((poll % 10) != 0 && !bxmitok &&
!padapter->bSurpriseRemoved && !padapter->bSurpriseRemoved &&
!padapter->bDriverStopped); !padapter->bDriverStopped);
......
...@@ -159,7 +159,7 @@ void rtw_ps_processor23a(struct rtw_adapter *padapter) ...@@ -159,7 +159,7 @@ void rtw_ps_processor23a(struct rtw_adapter *padapter)
if (pwrpriv->ips_mode_req == IPS_NONE) if (pwrpriv->ips_mode_req == IPS_NONE)
goto exit; goto exit;
if (rtw_pwr_unassociated_idle(padapter) == false) if (!rtw_pwr_unassociated_idle(padapter))
goto exit; goto exit;
if (pwrpriv->rf_pwrstate == rf_on && if (pwrpriv->rf_pwrstate == rf_on &&
......
...@@ -866,7 +866,7 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter, ...@@ -866,7 +866,7 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
int pie_len, ssid_len, privacy; int pie_len, ssid_len, privacy;
const u8 *p, *ssid; const u8 *p, *ssid;
if (is_client_associated_to_ap23a(Adapter) == false) if (!is_client_associated_to_ap23a(Adapter))
return _SUCCESS; return _SUCCESS;
if (unlikely(!ieee80211_is_beacon(mgmt->frame_control))) { if (unlikely(!ieee80211_is_beacon(mgmt->frame_control))) {
......
...@@ -612,7 +612,7 @@ static void _PHY_PathADDAOn(struct rtw_adapter *pAdapter, u32 *ADDAReg, bool isP ...@@ -612,7 +612,7 @@ static void _PHY_PathADDAOn(struct rtw_adapter *pAdapter, u32 *ADDAReg, bool isP
u32 i; u32 i;
pathOn = isPathAOn ? 0x04db25a4 : 0x0b1b25a4; pathOn = isPathAOn ? 0x04db25a4 : 0x0b1b25a4;
if (false == is2T) { if (!is2T) {
pathOn = 0x0bdb25a0; pathOn = 0x0bdb25a0;
PHY_SetBBReg(pAdapter, ADDAReg[0], bMaskDWord, 0x0b1b25a0); PHY_SetBBReg(pAdapter, ADDAReg[0], bMaskDWord, 0x0b1b25a0);
} else { } else {
......
...@@ -1945,13 +1945,13 @@ Hal_EfuseParseThermalMeter_8723A(struct rtw_adapter *padapter, ...@@ -1945,13 +1945,13 @@ Hal_EfuseParseThermalMeter_8723A(struct rtw_adapter *padapter,
/* */ /* */
/* ThermalMeter from EEPROM */ /* ThermalMeter from EEPROM */
/* */ /* */
if (AutoloadFail == false) if (!AutoloadFail)
pHalData->EEPROMThermalMeter = pHalData->EEPROMThermalMeter =
PROMContent[EEPROM_THERMAL_METER_8723A]; PROMContent[EEPROM_THERMAL_METER_8723A];
else else
pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter; pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
if ((pHalData->EEPROMThermalMeter == 0xff) || (AutoloadFail == true)) { if ((pHalData->EEPROMThermalMeter == 0xff) || AutoloadFail) {
pHalData->bAPKThermalMeterIgnore = true; pHalData->bAPKThermalMeterIgnore = true;
pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter; pHalData->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
} }
......
...@@ -480,7 +480,7 @@ static void _InitRFType(struct rtw_adapter *Adapter) ...@@ -480,7 +480,7 @@ static void _InitRFType(struct rtw_adapter *Adapter)
pHalData->rf_chip = RF_6052; pHalData->rf_chip = RF_6052;
if (is92CU == false) { if (!is92CU) {
pHalData->rf_type = RF_1T1R; pHalData->rf_type = RF_1T1R;
DBG_8723A("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n"); DBG_8723A("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n");
return; return;
......
...@@ -270,7 +270,7 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state) ...@@ -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) static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
{ {
spin_lock_bh(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, state) == true) if (check_fwstate(pmlmepriv, state))
pmlmepriv->fw_state ^= state; pmlmepriv->fw_state ^= state;
spin_unlock_bh(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment