Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723bs: core: Remove true and false comparison

Remove comparison to true and false in if statement.
Issue found with checkpatch.pl.
CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Kushal Kothari <kushalkothari285@gmail.com>
Link: https://lore.kernel.org/r/20211020115621.132500-1-kushalkothari285@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kushal Kothari and committed by
Greg Kroah-Hartman
cf8f6446 26f44837

+8 -9
+8 -9
drivers/staging/rtl8723bs/core/rtw_cmd.c
··· 309 309 if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan)) 310 310 bAllow = true; 311 311 312 - if ((pcmdpriv->padapter->hw_init_completed == false && bAllow == false) 313 - || atomic_read(&(pcmdpriv->cmdthd_running)) == false /* com_thread not running */ 314 - ) 312 + if ((!pcmdpriv->padapter->hw_init_completed && !bAllow) || 313 + !atomic_read(&pcmdpriv->cmdthd_running)) /* com_thread not running */ 315 314 return _FAIL; 316 315 317 316 return _SUCCESS; ··· 406 407 break; 407 408 } 408 409 409 - if ((padapter->bDriverStopped == true) || (padapter->bSurpriseRemoved == true)) { 410 + if (padapter->bDriverStopped || padapter->bSurpriseRemoved) { 410 411 netdev_dbg(padapter->pnetdev, 411 412 "%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n", 412 413 __func__, padapter->bDriverStopped, ··· 429 430 continue; 430 431 431 432 _next: 432 - if ((padapter->bDriverStopped == true) || (padapter->bSurpriseRemoved == true)) { 433 + if (padapter->bDriverStopped || padapter->bSurpriseRemoved) { 433 434 netdev_dbg(padapter->pnetdev, 434 435 "%s: DriverStopped(%d) SurpriseRemoved(%d) break at line %d\n", 435 436 __func__, padapter->bDriverStopped, ··· 926 927 else 927 928 GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false); 928 929 929 - if (unicast_key == true) 930 + if (unicast_key) 930 931 memcpy(&psetstakey_para->key, &sta->dot118021x_UncstKey, 16); 931 932 else 932 933 memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16); ··· 1282 1283 (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) { 1283 1284 bEnterPS = false; 1284 1285 1285 - if (bBusyTraffic == true) { 1286 + if (bBusyTraffic) { 1286 1287 if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount <= 4) 1287 1288 pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 4; 1288 1289 ··· 1618 1619 1619 1620 rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); 1620 1621 1621 - while (false == empty && jiffies_to_msecs(jiffies - start) < g_wait_hiq_empty) { 1622 + while (!empty && jiffies_to_msecs(jiffies - start) < g_wait_hiq_empty) { 1622 1623 msleep(100); 1623 1624 rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); 1624 1625 } ··· 2053 2054 2054 2055 spin_lock_bh(&pmlmepriv->lock); 2055 2056 2056 - if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)) 2057 + if (check_fwstate(pmlmepriv, WIFI_MP_STATE) && check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) 2057 2058 _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); 2058 2059 2059 2060 set_fwstate(pmlmepriv, _FW_LINKED);