[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200626.121920.1999662353247081439.davem@davemloft.net>
Date: Fri, 26 Jun 2020 12:19:20 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: natechancellor@...il.com
Cc: kuba@...nel.org, j.vosburgh@...il.com, vfalico@...il.com,
andy@...yhouse.net, jarod@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH net-next] bonding: Remove extraneous parentheses in
bond_setup
From: Nathan Chancellor <natechancellor@...il.com>
Date: Thu, 25 Jun 2020 21:10:02 -0700
> 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: 18cb261afd7b ("bonding: support hardware encryption offload to slaves")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1066
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
Applied, thank you.
Powered by blists - more mailing lists