From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 8C0F21CC71 for ; Sat, 12 May 2018 03:51:20 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Sat, 12 May 2018 09:51:16 +0800 Message-ID: <152608987682.121480.6298707358042668817.stgit@localhost.localdomain> In-Reply-To: <152608979178.121480.7311972440076541560.stgit@localhost.localdomain> References: <152608979178.121480.7311972440076541560.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/4] net/bnx2x: correct unmeetable comparison X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2018 01:51:20 -0000 /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)))); This was fixed elsewhere in 2014 Signed-off-by: Andy Green Fixes: b5bf7719221d ("bnx2x: driver support routines") Cc: stable@dpdk.org --- drivers/net/bnx2x/elink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index cceae6f9b..74e1bead3 100644 --- a/drivers/net/bnx2x/elink.c +++ b/drivers/net/bnx2x/elink.c @@ -12921,7 +12921,7 @@ static void elink_check_kr2_wa(struct elink_params *params, */ not_kr2_device = (((base_page & 0x8000) == 0) || (((base_page & 0x8000) && - ((next_page & 0xe0) == 0x2)))); + ((next_page & 0xe0) == 0x20)))); /* In case KR2 is already disabled, check if we need to re-enable it */ if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) {