From: Stephen Hemminger <stephen@networkplumber.org>
To: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Cc: Andy Green <andy@warmcat.com>, "dev@dpdk.org" <dev@dpdk.org>,
"Patil, Harish" <Harish.Patil@cavium.com>,
"Mody, Rasesh" <Rasesh.Mody@cavium.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH 2/4] net/bnx2x: remove unmeetable comparison
Date: Fri, 11 May 2018 11:10:57 -0700 [thread overview]
Message-ID: <20180511111057.64b617f3@xeon-e3> (raw)
In-Reply-To: <E115CCD9D858EF4F90C690B0DCB4D8976CD090A4@IRSMSX108.ger.corp.intel.com>
On Fri, 11 May 2018 16:32:24 +0000
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com> 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
> >
> > /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)) {
>
> Looks like a good fix, but I wonder what's the actual intention of that conditional.
> CC'ing the maintainers and Stephen Hemminger (the author of this code) to figure it out.
>
> Apart from that, missing signed-off-by, fixes line and Cc stable:
>
> Fixes: b5bf7719221d ("bnx2x: driver support routines")
> Cc: stable@dpdk.org
>
Actually, I didn't write this. It came from contractors. Based of FreeBSD
driver so look there.
next prev parent reply other threads:[~2018-05-11 18:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 1:51 [PATCH 0/4] GCC8 fixes for MLX4/5/BNX2X PMD Andy Green
2018-05-11 1:51 ` [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 ` [PATCH 2/4] net/bnx2x: remove unmeetable comparison Andy Green
2018-05-11 16:32 ` De Lara Guarch, Pablo
2018-05-11 18:10 ` Stephen Hemminger [this message]
2018-05-12 1:04 ` Andy Green
2018-05-11 1:51 ` [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 ` [PATCH 4/4] net/bnx2x: solve overruns Andy Green
2018-05-11 16:21 ` De Lara Guarch, Pablo
2018-05-11 16:04 ` [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=20180511111057.64b617f3@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=Harish.Patil@cavium.com \
--cc=Rasesh.Mody@cavium.com \
--cc=andy@warmcat.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.