From: Andy Green <andy@warmcat.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison
Date: Fri, 11 May 2018 09:51:22 +0800 [thread overview]
Message-ID: <152600348247.53624.13691884496521997911.stgit@localhost.localdomain> (raw)
In-Reply-To: <152600339444.53624.14086407337377549776.stgit@localhost.localdomain>
/home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:
In function ‘elink_check_kr2_wa’:
/home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:12922:28:
error: bitwise comparison always evaluates to false
[-Werror=tautological-compare]
((next_page & 0xe0) == 0x2))));
---
drivers/net/bnx2x/elink.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c
index 99684a5f9..2aef2b6da 100644
--- a/drivers/net/bnx2x/elink.c
+++ b/drivers/net/bnx2x/elink.c
@@ -12919,9 +12919,7 @@ static void elink_check_kr2_wa(struct elink_params *params,
* but only KX is advertised, declare this link partner as non-KR2
* device.
*/
- not_kr2_device = (((base_page & 0x8000) == 0) ||
- (((base_page & 0x8000) &&
- ((next_page & 0xe0) == 0x2))));
+ not_kr2_device = !(base_page & 0x8000);
/* In case KR2 is already disabled, check if we need to re-enable it */
if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) {
next prev parent reply other threads:[~2018-05-11 1:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 1:51 [dpdk-dev] [PATCH 0/4] GCC8 fixes for MLX4/5/BNX2X PMD Andy Green
2018-05-11 1:51 ` [dpdk-dev] [PATCH 1/4] net/bnx2x: do not cast function pointers as a policy Andy Green
2018-05-11 16:03 ` Ferruh Yigit
2018-05-12 0:25 ` Andy Green
2018-05-11 16:33 ` De Lara Guarch, Pablo
2018-05-11 1:51 ` Andy Green [this message]
2018-05-11 16:32 ` [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison De Lara Guarch, Pablo
2018-05-11 18:10 ` Stephen Hemminger
2018-05-12 1:04 ` Andy Green
2018-05-11 1:51 ` [dpdk-dev] [PATCH 3/4] net/mlx5: solve var may be used uninitialized Andy Green
2018-05-11 16:25 ` De Lara Guarch, Pablo
2018-05-13 4:45 ` Shahaf Shuler
2018-05-13 5:25 ` Andy Green
2018-05-11 1:51 ` [dpdk-dev] [PATCH 4/4] net/bnx2x: solve overruns Andy Green
2018-05-11 16:21 ` De Lara Guarch, Pablo
2018-05-11 16:04 ` [dpdk-dev] [PATCH 0/4] GCC8 fixes for MLX4/5/BNX2X PMD Ferruh Yigit
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=152600348247.53624.13691884496521997911.stgit@localhost.localdomain \
--to=andy@warmcat.com \
--cc=dev@dpdk.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).