[PATCH 2/4] Staging: rtl8188eu: Bool tests don't need comparisons

From: Shraddha Barke
Date: Sat Sep 12 2015 - 01:50:35 EST


This patch removes comparisons to true/false values on bool variables.
Fix made using Coccinelle

Signed-off-by: Shraddha Barke <shraddha.6596@xxxxxxxxx>
---
drivers/staging/rtl8188eu/core/rtw_cmd.c | 4 ++--
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 6 ++++----
drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_xmit.c | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 001a2f3..898e33e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -272,7 +272,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

- if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
+ if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);

ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
@@ -903,7 +903,7 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)
pmlmepriv = &(padapter->mlmepriv);

#ifdef CONFIG_88EU_AP_MODE
- if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
+ if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
expire_timeout_chk(padapter);
#endif

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 22f5b45..6566540 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -180,7 +180,7 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid)

rtw_disassoc_cmd(padapter, 0, true);

- if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
+ if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_indicate_disconnect(padapter);

rtw_free_assoc_resources(padapter);
@@ -290,7 +290,7 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)

rtw_disassoc_cmd(padapter, 0, true);

- if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
+ if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_indicate_disconnect(padapter);

rtw_free_assoc_resources(padapter);
@@ -369,7 +369,7 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *padapter,
rtw_free_assoc_resources(padapter);

if ((*pold_state == Ndis802_11Infrastructure) || (*pold_state == Ndis802_11IBSS)) {
- if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
+ if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_indicate_disconnect(padapter); /* will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not */
}

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 44eeb03..8c99c69 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -1028,7 +1028,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
pxmitframe->attrib.triggered = 1;

spin_unlock_bh(&psta->sleep_q.lock);
- if (rtw_hal_xmit(padapter, pxmitframe) == true)
+ if (rtw_hal_xmit(padapter, pxmitframe))
rtw_os_xmit_complete(padapter, pxmitframe);
spin_lock_bh(&psta->sleep_q.lock);

@@ -1925,7 +1925,7 @@ void rtw_reordering_ctrl_timeout_handler(unsigned long data)

spin_lock_bh(&ppending_recvframe_queue->lock);

- if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true) == true)
+ if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true))
mod_timer(&preorder_ctrl->reordering_ctrl_timer,
jiffies + msecs_to_jiffies(REORDER_WAIT_TIME));

diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
index 077b39a..3d17808 100644
--- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
@@ -203,7 +203,7 @@ static unsigned int ratetbl2rateset(struct adapter *padapter, unsigned char *rat
default:
rate = ratetbl_val_2wifirate(rate);

- if (is_basicrate(padapter, rate) == true)
+ if (is_basicrate(padapter, rate))
rate |= IEEE80211_BASIC_RATE_MASK;

rateset[len] = rate;
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index 5dc0b90..987663f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -2111,7 +2111,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst

pxmitframe->attrib.triggered = 1;

- if (rtw_hal_xmit(padapter, pxmitframe) == true)
+ if (rtw_hal_xmit(padapter, pxmitframe))
rtw_os_xmit_complete(padapter, pxmitframe);

if ((psta->sleepq_ac_len == 0) && (!psta->has_legacy_ac) && (wmmps_ac)) {
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/