From: Janani Sankara Babu Date: Tue, 5 Sep 2017 10:36:36 +0000 (+0530) Subject: staging:rtl8188eu Fix coding style issues X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ca442105c9d73e47619271d95bc63fe554d59628;p=openwrt%2Fstaging%2Fblogic.git staging:rtl8188eu Fix coding style issues This patch aims to solve coding style issues by placing constants on the right side of the test Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index 4ab1f759b25c..9ba511aca48d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -525,7 +525,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE; else pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/* PS_MODE_MIN; */ - pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? true : false; + pwrctrlpriv->bLeisurePs = (pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE) ? true : false; pwrctrlpriv->bFwCurrentInPSMode = false; @@ -595,7 +595,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal } if (rf_off == pwrpriv->rf_pwrstate) { DBG_88E("%s call ips_leave....\n", __func__); - if (_FAIL == ips_leave(padapter)) { + if (ips_leave(padapter) == _FAIL) { DBG_88E("======> ips_leave fail.............\n"); ret = _FAIL; goto exit; @@ -628,12 +628,12 @@ int rtw_pm_set_lps(struct adapter *padapter, u8 mode) if (mode < PS_MODE_NUM) { if (pwrctrlpriv->power_mgnt != mode) { - if (PS_MODE_ACTIVE == mode) + if (mode == PS_MODE_ACTIVE) LeaveAllPowerSaveMode(padapter); else pwrctrlpriv->LpsIdleCount = 2; pwrctrlpriv->power_mgnt = mode; - pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? true : false; + pwrctrlpriv->bLeisurePs = (pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE) ? true : false; } } else { ret = -EINVAL; @@ -653,7 +653,7 @@ int rtw_pm_set_ips(struct adapter *padapter, u8 mode) } else if (mode == IPS_NONE) { rtw_ips_mode_req(pwrctrlpriv, mode); DBG_88E("%s %s\n", __func__, "IPS_NONE"); - if ((padapter->bSurpriseRemoved == 0) && (_FAIL == rtw_pwr_wakeup(padapter))) + if ((padapter->bSurpriseRemoved == 0) && (rtw_pwr_wakeup(padapter) == _FAIL)) return -EFAULT; } else { return -EINVAL;