On Wed, Sep 19, 2018 at 08:32:29PM -0700, Nathan Chancellor wrote:
> Clang warns when more than one set of parentheses are used in single
> conditional statements.
>
> drivers/infiniband/hw/mlx4/mcg.c:676:16: warning: equality comparison
> with extraneous parentheses [-Wparentheses-equality]
>                         if ((method == IB_MGMT_METHOD_GET_RESP)) {
>                              ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/mlx4/mcg.c:676:16: note: remove extraneous
> parentheses around the comparison to silence this warning
>                         if ((method == IB_MGMT_METHOD_GET_RESP)) {
>                             ~       ^                         ~
> drivers/infiniband/hw/mlx4/mcg.c:676:16: note: use '=' to turn this
> equality comparison into an assignment
>                         if ((method == IB_MGMT_METHOD_GET_RESP)) {
>                                     ^~
>                                     =
>
> Remove the unnecessary parentheses to silence this warning.
>
> Reported-by: Nick Desaulniers <ndesaulni...@google.com>
> Signed-off-by: Nathan Chancellor <natechancel...@gmail.com>
> ---
>  drivers/infiniband/hw/mlx4/mcg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leo...@mellanox.com>

Attachment: signature.asc
Description: PGP signature

Reply via email to