Re: [PATCH] IB/mlx4: Remove unnecessary parentheses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-09-19 at 20:32 -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@xxxxxxxxxx>
> Signed-off-by: Nathan Chancellor <natechancellor@xxxxxxxxx>

Applied to for-next, thanks.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux