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

staging: rtl8723bs: core: Move constants to the right of comparison

Move constant variables to the right side of comparisons to increase
consistency with Linux kernel code base.
Reported by checkpatch.

Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Link: https://lore.kernel.org/r/20210406161131.GA103324@zhans
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Zhansaya Bagdauletkyzy and committed by
Greg Kroah-Hartman
bc21df67 cd2c3042

+8 -8
+8 -8
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
··· 89 89 ret = _ips_leave(padapter); 90 90 mutex_unlock(&pwrpriv->lock); 91 91 92 - if (_SUCCESS == ret) 92 + if (ret == _SUCCESS) 93 93 hal_btcoex_IpsNotify(padapter, IPS_NONE); 94 94 95 95 return ret; ··· 372 372 return; 373 373 374 374 if (pwrpriv->pwr_mode == ps_mode) 375 - if (PS_MODE_ACTIVE == ps_mode) 375 + if (ps_mode == PS_MODE_ACTIVE) 376 376 return; 377 377 378 378 ··· 805 805 806 806 mutex_unlock(&pwrctrl->lock); 807 807 808 - if (_FAIL == res) 808 + if (res == _FAIL) 809 809 if (pwrctrl->cpwm >= PS_STATE_S2) 810 810 res = _SUCCESS; 811 811 ··· 890 890 891 891 mutex_unlock(&pwrctrl->lock); 892 892 893 - if (_FAIL == res) 893 + if (res == _FAIL) 894 894 if (pwrctrl->cpwm >= PS_STATE_S2) 895 895 res = _SUCCESS; 896 896 ··· 935 935 936 936 mutex_unlock(&pwrctrl->lock); 937 937 938 - if (_FAIL == res) 938 + if (res == _FAIL) 939 939 if (pwrctrl->cpwm >= PS_STATE_S2) 940 940 res = _SUCCESS; 941 941 ··· 1146 1146 if (rf_off == pwrpriv->rf_pwrstate) { 1147 1147 { 1148 1148 DBG_8192C("%s call ips_leave....\n", __func__); 1149 - if (_FAIL == ips_leave(padapter)) { 1149 + if (ips_leave(padapter) == _FAIL) { 1150 1150 DBG_8192C("======> ips_leave fail.............\n"); 1151 1151 ret = _FAIL; 1152 1152 goto exit; ··· 1180 1180 1181 1181 if (mode < PS_MODE_NUM) { 1182 1182 if (pwrctrlpriv->power_mgnt != mode) { 1183 - if (PS_MODE_ACTIVE == mode) 1183 + if (mode == PS_MODE_ACTIVE) 1184 1184 LeaveAllPowerSaveMode(padapter); 1185 1185 else 1186 1186 pwrctrlpriv->LpsIdleCount = 2; ··· 1206 1206 } else if (mode == IPS_NONE) { 1207 1207 rtw_ips_mode_req(pwrctrlpriv, mode); 1208 1208 DBG_871X("%s %s\n", __func__, "IPS_NONE"); 1209 - if ((padapter->bSurpriseRemoved == 0) && (_FAIL == rtw_pwr_wakeup(padapter))) 1209 + if ((padapter->bSurpriseRemoved == 0) && (rtw_pwr_wakeup(padapter) == _FAIL)) 1210 1210 return -EFAULT; 1211 1211 } else 1212 1212 return -EINVAL;