From 941add8e3e63a46bbb245abc9f9664aaaa4bb4da Mon Sep 17 00:00:00 2001 From: Puranjay Mohan Date: Thu, 16 May 2019 14:41:40 +0530 Subject: [PATCH] Staging: rtl8723bs: hal: Fix comparison to bool in if statements 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 4 ++-- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 2 +- drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 2 +- drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 6 +++--- drivers/staging/rtl8723bs/hal/hal_com.c | 2 +- drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c index bae59e5..19856e8 100644 --- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c +++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c @@ -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. */ diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c index 3c8e26a..b80c5b1 100644 --- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c @@ -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); diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c index ba42b4d..426f68b 100644 --- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c +++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c @@ -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. */ diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c index 53d3bdf..3239d37 100644 --- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c @@ -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)) diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c index e5f1153..2763479 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com.c +++ b/drivers/staging/rtl8723bs/hal/hal_com.c @@ -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); diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DIG.c index 4fa6cd3..d7d87faf 100644 --- a/drivers/staging/rtl8723bs/hal/odm_DIG.c +++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c @@ -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")); -- 2.7.4