summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristina Opriceana <cristina.opriceana@gmail.com>2015-03-13 19:21:31 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-16 14:56:46 (GMT)
commita0886f7303310525f032debdff85877356c9a7ab (patch)
treee5fb26baa03c421a1ee93b9e484a7669a53b9c7c
parent2a7089dbd1e8a9bec3d39efcb11c2eda6d5a95c0 (diff)
downloadlinux-a0886f7303310525f032debdff85877356c9a7ab.tar.xz
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>
-rw-r--r--drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c5
-rw-r--r--drivers/staging/rtl8192u/r8192U_core.c2
-rw-r--r--drivers/staging/rtl8192u/r819xU_firmware.c6
-rw-r--r--drivers/staging/rtl8192u/r819xU_phy.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index 0345f1c..ea92fde 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -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;
}
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index b6cd7ea..c6ff2f0 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -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++) {
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index e208c89..d27b1e2 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -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;
}
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 084e04f..3451ec7 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -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;