From: Jason Gunthorpe <jgg@ziepe.ca>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: Colin King <colin.king@canonical.com>,
Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>,
Doug Ledford <dledford@redhat.com>,
linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] opa_vnic: fix check on record->event, incorrect operator used
Date: Thu, 4 Apr 2019 08:32:13 -0300 [thread overview]
Message-ID: <20190404113213.GA2798@ziepe.ca> (raw)
In-Reply-To: <fb140949-383e-731b-95b1-c75c2f85dadd@intel.com>
On Thu, Apr 04, 2019 at 07:23:45AM -0400, Dennis Dalessandro wrote:
> On 4/4/2019 6:04 AM, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The check on record->event is always true because the wrong operator
> > is being used, used && instead of ||
> >
> > Addresses-Coverity: ("Constant expression result")
> > Fixes: fae7a699a925 ("opa_vnic: Convert vport_idr to XArray")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c b/drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c
> > index 76cd09410d9a..be5befd92d16 100644
> > +++ b/drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c
> > @@ -869,7 +869,7 @@ static void opa_vnic_event(struct ib_event_handler *handler,
> > record->event, dev_name(&record->device->dev),
> > record->element.port_num);
> > - if (record->event != IB_EVENT_PORT_ERR ||
> > + if (record->event != IB_EVENT_PORT_ERR &&
> > record->event != IB_EVENT_PORT_ACTIVE)
> > return;
> >
>
> Missed this in code review. Thanks!
>
> Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Applied to for-next, thanks
Jason
next prev parent reply other threads:[~2019-04-04 11:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 10:04 [PATCH][next] opa_vnic: fix check on record->event, incorrect operator used Colin King
2019-04-04 11:23 ` Dennis Dalessandro
2019-04-04 11:32 ` Jason Gunthorpe [this message]
2019-04-04 11:36 ` Mukesh Ojha
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=20190404113213.GA2798@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=colin.king@canonical.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=niranjana.vishwanathapura@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox