diff options
author | Nathan Chancellor <nathan@kernel.org> | 2021-08-05 11:58:05 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-05 21:12:40 +0200 |
commit | 717d933d003c88668cbfab145d02c86ff3cf8756 (patch) | |
tree | 44009c6fe7c31271a0df46a76be70b2a2f931739 /drivers/staging/r8188eu/core/rtw_pwrctrl.c | |
parent | staging: r8188eu: Remove rtw_buf_free() (diff) | |
download | linux-dev-717d933d003c88668cbfab145d02c86ff3cf8756.tar.xz linux-dev-717d933d003c88668cbfab145d02c86ff3cf8756.zip |
staging: r8188eu: Remove unnecessary parentheses
Clang warns several times across the driver along the lines of:
drivers/staging/r8188eu/core/rtw_pwrctrl.c:222:21: warning: equality
comparison with extraneous parentheses [-Wparentheses-equality]
if ((pwrpriv->rpwm == pslv)) {
~~~~~~~~~~~~~~^~~~~~~
drivers/staging/r8188eu/core/rtw_pwrctrl.c:222:21: note: remove
extraneous parentheses around the comparison to silence this warning
if ((pwrpriv->rpwm == pslv)) {
~ ^ ~
drivers/staging/r8188eu/core/rtw_pwrctrl.c:222:21: note: use '=' to turn
this equality comparison into an assignment
if ((pwrpriv->rpwm == pslv)) {
^~
=
1 warning generated.
The compilers have agreed that single parentheses are used for equality
and double parentheses are used for assignment within control flow
statements such as if and while so remove them in these places to fix
the warning.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210805185807.3296077-2-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu/core/rtw_pwrctrl.c')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index 2c029f85d63d..967c9623e7d1 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -218,7 +218,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) pslv = PS_STATE_S3; } - if ((pwrpriv->rpwm == pslv)) + if (pwrpriv->rpwm == pslv) return; if ((padapter->bSurpriseRemoved) || |