]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: Remove extraneous parentheses in bond_setup
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 26 Jun 2020 04:10:02 +0000 (21:10 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jun 2020 19:18:40 +0000 (12:18 -0700)
commit146d462fdb017ef69acef3a8c0a365ece05976e5
tree104913785cc1a5c5cb49b2bae4b7eb7545c548a5
parent4f7de7bf67707095dd4eceafa47b1779569a44a6
bonding: Remove extraneous parentheses in bond_setup

Clang warns:

drivers/net/bonding/bond_main.c:4657:23: warning: equality comparison
with extraneous parentheses [-Wparentheses-equality]
        if ((BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP))
             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

drivers/net/bonding/bond_main.c:4681:23: warning: equality comparison
with extraneous parentheses [-Wparentheses-equality]
        if ((BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP))
             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

This warning occurs when a comparision has two sets of parentheses,
which is usually the convention for doing an assignment within an
if statement. Since equality comparisons do not need a second set of
parentheses, remove them to fix the warning.

Fixes: 6424b693bac6 ("bonding: support hardware encryption offload to slaves")
Link: https://github.com/ClangBuiltLinux/linux/issues/1066
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reported-by: kernelci.org bot <bot@kernelci.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c