Commit 4bb01423 authored by Valentina Manea's avatar Valentina Manea Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: do not use comparisons on bool tests



This patch fixes coccinelle errors regarding comparisons
used in bool tests.

Signed-off-by: default avatarValentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: default avatarLisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 38272d20
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ bool phy_RF8256_Config_ParaFile(struct net_device *dev)

		rtStatus = rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF,
						(enum rf90_radio_path)eRFPath);
		if (rtStatus != true) {
		if (!rtStatus) {
			RT_TRACE(COMP_ERR, "PHY_RF8256_Config():Check "
				 "Radio[%d] Fail!!\n", eRFPath);
			goto phy_RF8256_Config_ParaFile_Fail;
@@ -245,7 +245,7 @@ void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8 powerlevel)
	struct r8192_priv *priv = rtllib_priv(dev);

	TxAGC = powerlevel;
	if (priv->bDynamicTxLowPower == true) {
	if (priv->bDynamicTxLowPower) {
		if (priv->CustomerID == RT_CID_819x_Netcore)
			TxAGC = 0x22;
		else
@@ -294,7 +294,7 @@ void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel)
			priv->Pwr_Track = writeVal_tmp;
		}

		if (priv->bDynamicTxHighPower == true)
		if (priv->bDynamicTxHighPower)
			writeVal = 0x03030303;
		else
			writeVal = (byte3 << 24) | (byte2 << 16) |
+4 −4
Original line number Diff line number Diff line
@@ -720,7 +720,7 @@ start:
	}
	priv->pFirmware->firmware_status = FW_STATUS_0_INIT;

	if (priv->RegRfOff == true)
	if (priv->RegRfOff)
		priv->rtllib->eRFPowerState = eRfOff;

	ulRegRead = read_nic_dword(dev, CPU_GEN);
@@ -745,7 +745,7 @@ start:
	}
	RT_TRACE(COMP_INIT, "BB Config Start!\n");
	rtStatus = rtl8192_BBConfig(dev);
	if (rtStatus != true) {
	if (!rtStatus) {
		RT_TRACE(COMP_ERR, "BB Config failed\n");
		return rtStatus;
	}
@@ -856,7 +856,7 @@ start:
	if (priv->ResetProgress == RESET_TYPE_NORESET) {
		RT_TRACE(COMP_INIT, "RF Config Started!\n");
		rtStatus = rtl8192_phy_RFConfig(dev);
		if (rtStatus != true) {
		if (!rtStatus) {
			RT_TRACE(COMP_ERR, "RF Config failed\n");
			return rtStatus;
		}
@@ -869,7 +869,7 @@ start:

	write_nic_byte(dev, 0x87, 0x0);

	if (priv->RegRfOff == true) {
	if (priv->RegRfOff) {
		RT_TRACE((COMP_INIT | COMP_RF | COMP_POWER),
			  "%s(): Turn off RF for RegRfOff ----------\n",
			  __func__);
+1 −1
Original line number Diff line number Diff line
@@ -329,7 +329,7 @@ bool init_firmware(struct net_device *dev)
		}

		rt_status = fw_download_code(dev, mapped_file, file_length);
		if (rt_status != true) {
		if (!rt_status) {
			goto download_firmware_fail;
		}

+4 −5
Original line number Diff line number Diff line
@@ -567,7 +567,7 @@ static bool rtl8192_BB_Config_ParaFile(struct net_device *dev)
		rtStatus  = rtl8192_phy_checkBBAndRF(dev,
					 (enum hw90_block)eCheckItem,
					 (enum rf90_radio_path)0);
		if (rtStatus != true) {
		if (!rtStatus) {
			RT_TRACE((COMP_ERR | COMP_PHY), "PHY_RF8256_Config():"
				 "Check PHY%d Fail!!\n", eCheckItem-1);
			return rtStatus;
@@ -1425,7 +1425,7 @@ static bool SetRFPowerState8190(struct net_device *dev,
	u8	i = 0, QueueID = 0;
	struct rtl8192_tx_ring  *ring = NULL;

	if (priv->SetRFPowerStateInProgress == true)
	if (priv->SetRFPowerStateInProgress)
		return false;
	RT_TRACE(COMP_PS, "===========> SetRFPowerState8190()!\n");
	priv->SetRFPowerStateInProgress = true;
@@ -1443,10 +1443,9 @@ static bool SetRFPowerState8190(struct net_device *dev,
					InitilizeCount--;
					priv->RegRfOff = false;
					rtstatus = NicIFEnableNIC(dev);
				} while ((rtstatus != true) &&
					 (InitilizeCount > 0));
				} while (!rtstatus && (InitilizeCount > 0));

				if (rtstatus != true) {
				if (!rtstatus) {
					RT_TRACE(COMP_ERR, "%s():Initialize Ada"
						 "pter fail,return\n",
						 __func__);
+6 −8
Original line number Diff line number Diff line
@@ -370,8 +370,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
	case eRfOn:
		priv->rtllib->RfOffReason &= (~ChangeSource);

		if ((ChangeSource == RF_CHANGE_BY_HW) &&
		    (priv->bHwRadioOff == true))
		if ((ChangeSource == RF_CHANGE_BY_HW) && priv->bHwRadioOff)
			priv->bHwRadioOff = false;

		if (!priv->rtllib->RfOffReason) {
@@ -405,8 +404,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
						      disas_lv_ss);
			}
		}
		if ((ChangeSource == RF_CHANGE_BY_HW) &&
		     (priv->bHwRadioOff == false))
		if ((ChangeSource == RF_CHANGE_BY_HW) && !priv->bHwRadioOff)
			priv->bHwRadioOff = true;
		priv->rtllib->RfOffReason |= ChangeSource;
		bActionAllowed = true;
@@ -428,7 +426,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
		PHY_SetRFPowerState(dev, StateToSet);
		if (StateToSet == eRfOn) {

			if (bConnectBySSID && (priv->blinked_ingpio == true)) {
			if (bConnectBySSID && priv->blinked_ingpio) {
				queue_delayed_work_rsl(ieee->wq,
					 &ieee->associate_procedure_wq, 0);
				priv->blinked_ingpio = false;
@@ -955,7 +953,7 @@ static int _rtl8192_sta_up(struct net_device *dev, bool is_silent_reset)
	RT_TRACE(COMP_INIT, "Bringing up iface");
	priv->bfirst_init = true;
	init_status = priv->ops->initialize_adapter(dev);
	if (init_status != true) {
	if (!init_status) {
		RT_TRACE(COMP_ERR, "ERR!!! %s(): initialization is failed!\n",
			 __func__);
		priv->bfirst_init = false;
@@ -1647,7 +1645,7 @@ void rtl819x_watchdog_wqcallback(void *data)
	bool	bHigherBusyRxTraffic = false;
	bool bEnterPS = false;

	if (IS_NIC_DOWN(priv) || (priv->bHwRadioOff == true))
	if (IS_NIC_DOWN(priv) || priv->bHwRadioOff)
		return;

	if (priv->rtllib->state >= RTLLIB_LINKED) {
@@ -3045,7 +3043,7 @@ bool NicIFEnableNIC(struct net_device *dev)
	RT_TRACE(COMP_PS, "===========>%s()\n", __func__);
	priv->bfirst_init = true;
	init_status = priv->ops->initialize_adapter(dev);
	if (init_status != true) {
	if (!init_status) {
		RT_TRACE(COMP_ERR, "ERR!!! %s(): initialization is failed!\n",
			 __func__);
		priv->bdisable_nic = false;
Loading