Staging: rtl8723bs: hal: Fix comparison to bool in if statements
authorPuranjay Mohan <puranjay12@gmail.com>
Thu, 16 May 2019 09:11:40 +0000 (14:41 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 May 2019 05:40:43 +0000 (07:40 +0200)
Fix following warnings reported by coccicheck:
WARNING: Comparison to bool
by using !x in place of (x == false) and
x in place of (x == true).

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c
drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
drivers/staging/rtl8723bs/hal/hal_com.c
drivers/staging/rtl8723bs/hal/odm_DIG.c

index bae59e5..19856e8 100644 (file)
@@ -299,7 +299,7 @@ void ODM_ReadAndConfig_MP_8723B_AGC_TAB(PDM_ODM_T pDM_Odm)
                                READ_NEXT_PAIR(v1, v2, i);
                        }
 
-                       if (bMatched == false) {
+                       if (!bMatched) {
                                /*  Condition isn't matched.
                                *   Discard the following (offset, data) pairs.
                                */
@@ -568,7 +568,7 @@ void ODM_ReadAndConfig_MP_8723B_PHY_REG(PDM_ODM_T pDM_Odm)
                                READ_NEXT_PAIR(v1, v2, i);
                        }
 
-                       if (bMatched == false) {
+                       if (!bMatched) {
                                /*  Condition isn't matched.
                                *   Discard the following (offset, data) pairs.
                                */
index 3c8e26a..b80c5b1 100644 (file)
@@ -270,7 +270,7 @@ void ODM_ReadAndConfig_MP_8723B_MAC_REG(PDM_ODM_T pDM_Odm)
                                READ_NEXT_PAIR(v1, v2, i);
                        }
 
-                       if (bMatched == false) {
+                       if (!bMatched) {
                                /*  Condition isn't matched. Discard the following (offset, data) pairs. */
                                while (v1 < 0x40000000 && i < ArrayLen-2)
                                        READ_NEXT_PAIR(v1, v2, i);
index ba42b4d..426f68b 100644 (file)
@@ -301,7 +301,7 @@ void ODM_ReadAndConfig_MP_8723B_RadioA(PDM_ODM_T pDM_Odm)
                                READ_NEXT_PAIR(v1, v2, i);
                        }
 
-                       if (bMatched == false) {
+                       if (!bMatched) {
                                /*  Condition isn't matched.
                                *   Discard the following (offset, data) pairs.
                                */
index 53d3bdf..3239d37 100644 (file)
@@ -1292,7 +1292,7 @@ static void _PHY_SaveADDARegisters8723B(
        struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
        PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
 
-       if (ODM_CheckPowerStatus(padapter) == false)
+       if (!ODM_CheckPowerStatus(padapter))
                return;
 
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save ADDA parameters.\n"));
@@ -1363,7 +1363,7 @@ static void _PHY_PathADDAOn8723B(
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("ADDA ON.\n"));
 
        pathOn = 0x01c00014;
-       if (false == is2T) {
+       if (!is2T) {
                pathOn = 0x01c00014;
                PHY_SetBBReg(pDM_Odm->Adapter, ADDAReg[0], bMaskDWord, 0x01c00014);
        } else {
@@ -1811,7 +1811,7 @@ void PHY_IQCalibrate_8723B(
        u32             StartTime;
        s32                     ProgressingTime;
 
-       if (ODM_CheckPowerStatus(padapter) == false)
+       if (!ODM_CheckPowerStatus(padapter))
                return;
 
        if (!(pDM_Odm->SupportAbility & ODM_RF_CALIBRATION))
index e5f1153..2763479 100644 (file)
@@ -125,7 +125,7 @@ u8 hal_com_config_channel_plan(
        if (0xFF == hw_channel_plan)
                AutoLoadFail = true;
 
-       if (false == AutoLoadFail) {
+       if (!AutoLoadFail) {
                u8 hw_chnlPlan;
 
                hw_chnlPlan = hw_channel_plan & (~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
index 4fa6cd3..d7d87fa 100644 (file)
@@ -525,7 +525,7 @@ void odm_DIG(void *pDM_VOID)
        bool bDFSBand = false;
        bool bPerformance = true, bFirstTpTarget = false, bFirstCoverage = false;
 
-       if (odm_DigAbort(pDM_Odm) == true)
+       if (odm_DigAbort(pDM_Odm))
                return;
 
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() ===========================>\n\n"));