Skip to contentSkip to conversation

isdn/hisax: Remove unnecessary parenthesis

PATCH Applied Nathan Chancellor 2 participants 2 messages Sep 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isdn/hisax: Remove unnecessary parenthesis

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.

---
 drivers/isdn/hisax/w6692.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/isdn/hisax/w6692.c +1 -1
index c4be1644f5bb..bb8e4b7e34ea 100644
@@ -624,7 +624,7 @@ W6692_l1hw(struct PStack *st, int pr, void *arg)
 		break;
 	case (HW_RESET | REQUEST):
 		spin_lock_irqsave(&cs->lock, flags);
-		if ((cs->dc.w6692.ph_state == W_L1IND_DRD)) {
+		if (cs->dc.w6692.ph_state == W_L1IND_DRD) {
 			ph_command(cs, W_L1CMD_ECK);
 			spin_unlock_irqrestore(&cs->lock, flags);
 		} else {
Signature · 1 line
2.19.0
maintainer Applied
#1 lore raw

From: Nathan Chancellor <[email protected]>
Date: Wed, 19 Sep 2018 21:05:23 -0700

Quoted 16 lines

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)) {
                                           ^~
                                           =
Quoted 6 lines

1 warning generated.

Remove the parentheses to silence this warning.

Applied.