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

Staging: rtl8192u: Bool tests don't need comparisons

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>

authored by

Cristina Opriceana and committed by
Greg Kroah-Hartman
a0886f73 2a7089db

+7 -8
+2 -3
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
··· 269 269 //for(dir = DIR_UP; dir <= DIR_BI_DIR; dir++) 270 270 for(dir = 0; dir <= DIR_BI_DIR; dir++) 271 271 { 272 - if(search_dir[dir] ==false ) 272 + if (!search_dir[dir]) 273 273 continue; 274 274 list_for_each_entry(pRet, psearch_list, List){ 275 275 // 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 381 } 382 382 else 383 383 { 384 - if(bAddNewTs == false) 385 - { 384 + if (!bAddNewTs) { 386 385 IEEE80211_DEBUG(IEEE80211_DL_TS, "add new TS failed(tid:%d)\n", UP); 387 386 return false; 388 387 }
+1 -1
drivers/staging/rtl8192u/r8192U_core.c
··· 2823 2823 } 2824 2824 dm_initialize_txpower_tracking(dev); 2825 2825 2826 - if (priv->bDcut == true) { 2826 + if (priv->bDcut) { 2827 2827 u32 i, TempCCk; 2828 2828 u32 tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord); 2829 2829 for (i = 0; i < TxBBGainTableLength; i++) {
+3 -3
drivers/staging/rtl8192u/r819xU_firmware.c
··· 281 281 if (rst_opt == OPT_SYSTEM_RESET) 282 282 release_firmware(fw_entry); 283 283 284 - if (rt_status != true) 284 + if (!rt_status) 285 285 goto download_firmware_fail; 286 286 287 287 switch (init_step) { ··· 304 304 305 305 /* Check Put Code OK and Turn On CPU */ 306 306 rt_status = CPUcheck_maincodeok_turnonCPU(dev); 307 - if (rt_status != true) { 307 + if (!rt_status) { 308 308 RT_TRACE(COMP_ERR, "CPUcheck_maincodeok_turnonCPU fail!\n"); 309 309 goto download_firmware_fail; 310 310 } ··· 318 318 mdelay(1); 319 319 320 320 rt_status = CPUcheck_firmware_ready(dev); 321 - if (rt_status != true) { 321 + if (!rt_status) { 322 322 RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready fail(%d)!\n",rt_status); 323 323 goto download_firmware_fail; 324 324 }
+1 -1
drivers/staging/rtl8192u/r819xU_phy.c
··· 1099 1099 if (eRFPowerState == priv->ieee80211->eRFPowerState) 1100 1100 return false; 1101 1101 1102 - if (priv->SetRFPowerStateInProgress == true) 1102 + if (priv->SetRFPowerStateInProgress) 1103 1103 return false; 1104 1104 1105 1105 priv->SetRFPowerStateInProgress = true;