Files
linux/drivers
Nathan Chancellor 85dc2c65e6 misc: echo: Remove unnecessary parentheses and simplify check for zero
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/misc/echo/echo.c:384:27: warning: equality comparison with
extraneous parentheses [-Wparentheses-equality]
        if ((ec->nonupdate_dwell == 0)) {
             ~~~~~~~~~~~~~~~~~~~~^~~~
drivers/misc/echo/echo.c:384:27: note: remove extraneous parentheses
around the comparison to silence this warning
        if ((ec->nonupdate_dwell == 0)) {
            ~                    ^   ~
drivers/misc/echo/echo.c:384:27: note: use '=' to turn this equality
comparison into an assignment
        if ((ec->nonupdate_dwell == 0)) {
                                 ^~
                                 =
1 warning generated.

Remove them and while we're at it, simplify the zero check as '!var' is
used more than 'var == 0'.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-25 20:21:02 +02:00
..
2018-09-07 10:05:20 +02:00
2018-08-30 14:47:41 -07:00
2018-09-16 22:41:47 +02:00
2018-08-08 15:44:47 +10:00
2018-09-16 22:41:47 +02:00
2018-08-16 12:26:24 -07:00
2018-08-20 11:36:07 +02:00
2018-09-12 09:46:46 +02:00
2018-09-14 15:25:57 +02:00