Skip to content

Commit

Permalink
s390/qeth: remove useless if/else
Browse files Browse the repository at this point in the history
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 ab29c48 ("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>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Kaixu Xia authored and Jakub Kicinski committed Nov 19, 2020
1 parent 09840f7 commit 215d283
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/s390/net/qeth_l3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 215d283

Please sign in to comment.