lkml.org 
[lkml]   [2018]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] isdn/hisax: Remove unnecessary parenthesis
From
From: Nathan Chancellor <natechancellor@gmail.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@google.com>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied.

\
 
 \ /
  Last update: 2018-09-20 08:12    [W:1.176 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site