[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180919.231157.1883415235792885935.davem@davemloft.net>
Date: Wed, 19 Sep 2018 23:11:57 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: natechancellor@...il.com
Cc: isdn@...ux-pingi.de, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, ndesaulniers@...gle.com
Subject: Re: [PATCH] isdn/hisax: Remove unnecessary parenthesis
From: Nathan Chancellor <natechancellor@...il.com>
Date: Wed, 19 Sep 2018 21:05:23 -0700
> Clang warns when more than one set of parentheses are used for single
> conditional statements:
>
> drivers/isdn/hisax/w6692.c:627:30: warning: equality comparison with
> extraneous parentheses [-Wparentheses-equality]
> if ((cs->dc.w6692.ph_state == W_L1IND_DRD)) {
> ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
> drivers/isdn/hisax/w6692.c:627:30: note: remove extraneous parentheses
> around the comparison to silence this warning
> if ((cs->dc.w6692.ph_state == W_L1IND_DRD)) {
> ~ ^ ~
> drivers/isdn/hisax/w6692.c:627:30: note: use '=' to turn this equality
> comparison into an assignment
> if ((cs->dc.w6692.ph_state == W_L1IND_DRD)) {
> ^~
> =
> 1 warning generated.
>
> Remove the parentheses to silence this warning.
>
> Reported-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
Applied.
Powered by blists - more mailing lists