]> git.baikalelectronics.ru Git - kernel.git/commit
rsxx: Remove unnecessary parentheses
authorNathan Chancellor <natechancellor@gmail.com>
Tue, 11 Sep 2018 21:50:40 +0000 (14:50 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Sep 2018 22:56:39 +0000 (16:56 -0600)
commitc1d04393c647f56b2eec56423e461ad9849ace8c
tree9226d6bd03beffd7c09980c4037a265d2c66b0c5
parenteb1a4bfcabea6928b146a78c479aff8e192638e8
rsxx: Remove unnecessary parentheses

Clang warns when more than one set of parentheses is used for a
single conditional statement:

drivers/block/rsxx/cregs.c:279:15: warning: equality comparison with
extraneous parentheses [-Wparentheses-equality]
        if ((cmd->op == CREG_OP_READ)) {
             ~~~~~~~~^~~~~~~~~~~~~~~
drivers/block/rsxx/cregs.c:279:15: note: remove extraneous parentheses
around the comparison to silence this warning
        if ((cmd->op == CREG_OP_READ)) {
            ~        ^              ~
drivers/block/rsxx/cregs.c:279:15: note: use '=' to turn this equality
comparison into an assignment
        if ((cmd->op == CREG_OP_READ)) {
                     ^~
                     =
1 warning generated.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rsxx/cregs.c