Staging: rtl8192u: Bool tests don't need comparisons
authorCristina Opriceana <cristina.opriceana@gmail.com>
Fri, 13 Mar 2015 19:21:31 +0000 (21:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2015 14:56:46 +0000 (15:56 +0100)
This patch removes explicit true/false comparations to bool variables.
Warning found by coccinelle:
"WARNING: Comparison to bool"

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r819xU_firmware.c
drivers/staging/rtl8192u/r819xU_phy.c

index 0345f1caea546001b5d629292e94dfd4bc81a84a..ea92fdebe5a748a9f762f482f97ad706d428271e 100644 (file)
@@ -269,7 +269,7 @@ static PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee,
        //for(dir = DIR_UP; dir <= DIR_BI_DIR; dir++)
        for(dir = 0; dir <= DIR_BI_DIR; dir++)
        {
-               if(search_dir[dir] ==false )
+               if (!search_dir[dir])
                        continue;
                list_for_each_entry(pRet, psearch_list, List){
        //              IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
@@ -381,8 +381,7 @@ bool GetTs(
        }
        else
        {
-               if(bAddNewTs == false)
-               {
+               if (!bAddNewTs) {
                        IEEE80211_DEBUG(IEEE80211_DL_TS, "add new TS failed(tid:%d)\n", UP);
                        return false;
                }
index b6cd7ea744ad710e0d021cdb9a391a9db56639bd..c6ff2f0a4dd8453c794f382db6a45ef301f6176e 100644 (file)
@@ -2823,7 +2823,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
                }
                dm_initialize_txpower_tracking(dev);
 
-               if (priv->bDcut == true) {
+               if (priv->bDcut) {
                        u32 i, TempCCk;
                        u32 tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord);
                        for (i = 0; i < TxBBGainTableLength; i++) {
index e208c899bc5efd33e60a1baf3523cee4990fdc7d..d27b1e24ca4a1829141179bf7f2e617fa2eba79f 100644 (file)
@@ -281,7 +281,7 @@ bool init_firmware(struct net_device *dev)
                if (rst_opt == OPT_SYSTEM_RESET)
                        release_firmware(fw_entry);
 
-               if (rt_status != true)
+               if (!rt_status)
                        goto download_firmware_fail;
 
                switch (init_step) {
@@ -304,7 +304,7 @@ bool init_firmware(struct net_device *dev)
 
                        /* Check Put Code OK and Turn On CPU */
                        rt_status = CPUcheck_maincodeok_turnonCPU(dev);
-                       if (rt_status != true) {
+                       if (!rt_status) {
                                RT_TRACE(COMP_ERR, "CPUcheck_maincodeok_turnonCPU fail!\n");
                                goto download_firmware_fail;
                        }
@@ -318,7 +318,7 @@ bool init_firmware(struct net_device *dev)
                        mdelay(1);
 
                        rt_status = CPUcheck_firmware_ready(dev);
-                       if (rt_status != true) {
+                       if (!rt_status) {
                                RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready fail(%d)!\n",rt_status);
                                goto download_firmware_fail;
                        }
index 084e04fd15f87431bd22b669921a508c43ebff3b..3451ec75756c0230cc4517b0f9d492d9fe32aa00 100644 (file)
@@ -1099,7 +1099,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
        if (eRFPowerState == priv->ieee80211->eRFPowerState)
                return false;
 
-       if (priv->SetRFPowerStateInProgress == true)
+       if (priv->SetRFPowerStateInProgress)
                return false;
 
        priv->SetRFPowerStateInProgress = true;