From patchwork Fri May 11 01:51:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 39786 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A7F7C1C0ED; Fri, 11 May 2018 03:51:27 +0200 (CEST) Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 1C8CF1C0E7 for ; Fri, 11 May 2018 03:51:26 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Fri, 11 May 2018 09:51:22 +0800 Message-ID: <152600348247.53624.13691884496521997911.stgit@localhost.localdomain> In-Reply-To: <152600339444.53624.14086407337377549776.stgit@localhost.localdomain> References: <152600339444.53624.14086407337377549776.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Subject: [dpdk-dev] [PATCH 2/4] net/bnx2x: remove 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" /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)) {