diff options
author | Aastha Gupta <aastha.gupta4104@gmail.com> | 2017-10-08 10:24:51 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-18 16:07:49 +0200 |
commit | 95b3b4238581e72756505d601948f955e8baccf7 (patch) | |
tree | 12c7de20de9e4ebbf8449666e4823bd16f039324 /drivers/staging/rtl8723bs/core | |
parent | staging: rtl8723bs: Add space after ',' (diff) | |
download | linux-dev-95b3b4238581e72756505d601948f955e8baccf7.tar.xz linux-dev-95b3b4238581e72756505d601948f955e8baccf7.zip |
staging: rtl8723bs: remove ternary operators in assignmet statments
Remove unnecessary ternary operators in assignments statments.
This patch is with the help of following Coccinelle script:
@@
expression a, b, c;
binary operator op = {==, !=, <=, >=, <, >, &&, ||};
@@
c =
- (a op b) ? true : false
+ a op b
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/core')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c index 820a061506cc..4cd9798e262a 100644 --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c @@ -1154,7 +1154,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) pwrctrlpriv->LpsIdleCount = 0; 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; pwrctrlpriv->bFwCurrentInPSMode = false; @@ -1325,7 +1325,8 @@ int rtw_pm_set_lps(struct adapter *padapter, u8 mode) 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; } } else ret = -EINVAL; |