netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.ibm.com>
To: David Miller <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>
Cc: linux-netdev <netdev@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Heiko Carstens <hca@linux.ibm.com>,
	Karsten Graul <kgraul@linux.ibm.com>,
	Julian Wiedmann <jwi@linux.ibm.com>,
	Kaixu Xia <kaixuxia@tencent.com>
Subject: [PATCH net-next 3/9] s390/qeth: remove useless if/else
Date: Tue, 17 Nov 2020 17:15:14 +0100	[thread overview]
Message-ID: <20201117161520.1089-4-jwi@linux.ibm.com> (raw)
In-Reply-To: <20201117161520.1089-1-jwi@linux.ibm.com>

From: Kaixu Xia <kaixuxia@tencent.com>

Fix the following coccinelle report:

./drivers/s390/net/qeth_l3_main.c:107:2-4: WARNING: possible condition with no effect (if == else)

Both branches are the same since
commit ab29c480b194 ("s390/qeth: replace deprecated simple_stroul()"),
so remove them.

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
[jwi: point to the commit that introduced this]
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_l3_main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index b1c1d2510d55..264b6c782382 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -104,10 +104,7 @@ static bool qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card,
 		qeth_l3_convert_addr_to_bits(ipatoe->addr, ipatoe_bits,
 					  (ipatoe->proto == QETH_PROT_IPV4) ?
 					  4 : 16);
-		if (addr->proto == QETH_PROT_IPV4)
-			rc = !memcmp(addr_bits, ipatoe_bits, ipatoe->mask_bits);
-		else
-			rc = !memcmp(addr_bits, ipatoe_bits, ipatoe->mask_bits);
+		rc = !memcmp(addr_bits, ipatoe_bits, ipatoe->mask_bits);
 		if (rc)
 			break;
 	}
-- 
2.17.1


  parent reply	other threads:[~2020-11-17 16:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 16:15 [PATCH net-next 0/9] s390/qeth: updates 2020-11-17 Julian Wiedmann
2020-11-17 16:15 ` [PATCH net-next 1/9] s390/qeth: don't call INIT_LIST_HEAD() on iob's list entry Julian Wiedmann
2020-11-17 16:15 ` [PATCH net-next 2/9] s390/qeth: reduce rtnl locking for switchdev events Julian Wiedmann
2020-11-17 16:15 ` Julian Wiedmann [this message]
2020-11-17 16:15 ` [PATCH net-next 4/9] s390/qeth: tolerate error when querying card info Julian Wiedmann
2020-11-17 16:15 ` [PATCH net-next 5/9] s390/qeth: improve QUERY CARD INFO processing Julian Wiedmann
2020-11-17 16:15 ` [PATCH net-next 6/9] s390/qeth: set static link info during initialization Julian Wiedmann
2020-11-17 16:15 ` [PATCH net-next 7/9] s390/qeth: clean up default cases for ethtool link mode Julian Wiedmann
2020-11-17 16:15 ` [PATCH net-next 8/9] s390/qeth: use QUERY OAT for initial link info Julian Wiedmann
2020-11-17 16:15 ` [PATCH net-next 9/9] s390/qeth: improve selection of ethtool link modes Julian Wiedmann
2020-11-19  1:35 ` [PATCH net-next 0/9] s390/qeth: updates 2020-11-17 Jakub Kicinski
2020-11-19  9:25   ` Julian Wiedmann
2020-11-19 17:45     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201117161520.1089-4-jwi@linux.ibm.com \
    --to=jwi@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=hca@linux.ibm.com \
    --cc=kaixuxia@tencent.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).