[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180920050350.GE3519@mtr-leonro.mtl.com>
Date: Thu, 20 Sep 2018 08:03:50 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Yishai Hadas <yishaih@...lanox.com>,
Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] IB/mlx4: Remove unnecessary parentheses
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 <ndesaulniers@...gle.com>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
> drivers/infiniband/hw/mlx4/mcg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@...lanox.com>
Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)
Powered by blists - more mailing lists