From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 2/4] net/bnx2x: correct unmeetable comparison Date: Mon, 14 May 2018 12:17:29 +0100 Message-ID: <0368d85d-bf9e-bbeb-c8de-713015f2fb4a@intel.com> References: <152627420173.53058.13179290989817984940.stgit@localhost.localdomain> <152627427362.53058.5993339273922161219.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit To: Andy Green , dev@dpdk.org, Harish Patil , Rasesh Mody Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 7D6941C799 for ; Mon, 14 May 2018 13:17:32 +0200 (CEST) In-Reply-To: <152627427362.53058.5993339273922161219.stgit@localhost.localdomain> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 5/14/2018 6:04 AM, Andy Green wrote: > /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 To be able to apply this fix in dpdk I think we need maintainers ack on this change, they are cc'ed. > > 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)) { >