From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 2/4] net/bnx2x: remove unmeetable comparison Date: Fri, 11 May 2018 11:10:57 -0700 Message-ID: <20180511111057.64b617f3@xeon-e3> References: <152600339444.53624.14086407337377549776.stgit@localhost.localdomain> <152600348247.53624.13691884496521997911.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Andy Green , "dev@dpdk.org" , "Patil, Harish" , "Mody, Rasesh" , "stable@dpdk.org" To: "De Lara Guarch, Pablo" Return-path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id BF1E81C914 for ; Fri, 11 May 2018 20:11:00 +0200 (CEST) Received: by mail-pl0-f68.google.com with SMTP id a39-v6so3704709pla.10 for ; Fri, 11 May 2018 11:11:00 -0700 (PDT) In-Reply-To: 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 Fri, 11 May 2018 16:32:24 +0000 "De Lara Guarch, Pablo" wrote: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andy Green > > Sent: Friday, May 11, 2018 2:51 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison > >=20 > > /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c: > > In function =E2=80=98elink_check_kr2_wa=E2=80=99: > > /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:12922:28: > > error: bitwise comparison always evaluates to false [-Werror=3Dtautolog= ical- > > compare] > > ((next_page & 0xe0) =3D=3D 0x2)))); > > --- > > drivers/net/bnx2x/elink.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > >=20 > > 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_par= ams > > *params, > > * but only KX is advertised, declare this link partner as non-KR2 > > * device. > > */ > > - not_kr2_device =3D (((base_page & 0x8000) =3D=3D 0) || > > - (((base_page & 0x8000) && > > - ((next_page & 0xe0) =3D=3D 0x2)))); > > + not_kr2_device =3D !(base_page & 0x8000); > >=20 > > /* In case KR2 is already disabled, check if we need to re-enable it = */ > > if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) { =20 >=20 > Looks like a good fix, but I wonder what's the actual intention of that c= onditional. > CC'ing the maintainers and Stephen Hemminger (the author of this code) to= figure it out. >=20 > Apart from that, missing signed-off-by, fixes line and Cc stable: >=20 > Fixes: b5bf7719221d ("bnx2x: driver support routines") > Cc: stable@dpdk.org >=20 Actually, I didn't write this. It came from contractors. Based of FreeBSD driver so look there.