netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] isdn/hisax: amd7930_fn: Remove unnecessary parentheses
@ 2018-10-08 22:59 Nathan Chancellor
  2018-10-11  5:29 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-10-08 22:59 UTC (permalink / raw)
  To: Karsten Keil, David S. Miller; +Cc: netdev, linux-kernel, Nathan Chancellor

Clang warns when multiple sets of parentheses are used for a single
conditional statement.

drivers/isdn/hisax/amd7930_fn.c:628:32: warning: equality comparison
with extraneous parentheses [-Wparentheses-equality]
                if ((cs->dc.amd7930.ph_state == 8)) {
                     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/isdn/hisax/amd7930_fn.c:628:32: note: remove extraneous
parentheses around the comparison to silence this warning
                if ((cs->dc.amd7930.ph_state == 8)) {
                    ~                        ^   ~
drivers/isdn/hisax/amd7930_fn.c:628:32: note: use '=' to turn this
equality comparison into an assignment
                if ((cs->dc.amd7930.ph_state == 8)) {
                                             ^~
                                             =
1 warning generated.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/isdn/hisax/amd7930_fn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c
index 77debda2221b..6c336366128c 100644
--- a/drivers/isdn/hisax/amd7930_fn.c
+++ b/drivers/isdn/hisax/amd7930_fn.c
@@ -625,7 +625,7 @@ Amd7930_l1hw(struct PStack *st, int pr, void *arg)
 		break;
 	case (HW_RESET | REQUEST):
 		spin_lock_irqsave(&cs->lock, flags);
-		if ((cs->dc.amd7930.ph_state == 8)) {
+		if (cs->dc.amd7930.ph_state == 8) {
 			/* b-channels off, PH-AR cleared
 			 * change to F3 */
 			Amd7930_ph_command(cs, 0x20, "HW_RESET REQUEST"); //LMR1 bit 5
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] isdn/hisax: amd7930_fn: Remove unnecessary parentheses
  2018-10-08 22:59 [PATCH] isdn/hisax: amd7930_fn: Remove unnecessary parentheses Nathan Chancellor
@ 2018-10-11  5:29 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-10-11  5:29 UTC (permalink / raw)
  To: natechancellor; +Cc: isdn, netdev, linux-kernel

From: Nathan Chancellor <natechancellor@gmail.com>
Date: Mon,  8 Oct 2018 15:59:05 -0700

> Clang warns when multiple sets of parentheses are used for a single
> conditional statement.
> 
> drivers/isdn/hisax/amd7930_fn.c:628:32: warning: equality comparison
> with extraneous parentheses [-Wparentheses-equality]
>                 if ((cs->dc.amd7930.ph_state == 8)) {
>                      ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
> drivers/isdn/hisax/amd7930_fn.c:628:32: note: remove extraneous
> parentheses around the comparison to silence this warning
>                 if ((cs->dc.amd7930.ph_state == 8)) {
>                     ~                        ^   ~
> drivers/isdn/hisax/amd7930_fn.c:628:32: note: use '=' to turn this
> equality comparison into an assignment
>                 if ((cs->dc.amd7930.ph_state == 8)) {
>                                              ^~
>                                              =
> 1 warning generated.
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-11  5:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08 22:59 [PATCH] isdn/hisax: amd7930_fn: Remove unnecessary parentheses Nathan Chancellor
2018-10-11  5:29 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).