All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Saleem, Shiraz" <shiraz.saleem@intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>, Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Latif, Faisal" <faisal.latif@intel.com>,
	Doug Ledford <dledford@redhat.com>,
	Shannon Nelson <shannon.nelson@intel.com>,
	"Singhai, Anjali" <anjali.singhai@intel.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH] i40iw: Fix error handling in i40iw_manage_arp_cache()
Date: Mon, 27 Apr 2020 17:54:43 +0000	[thread overview]
Message-ID: <9DD61F30A802C4429A01CA4200E302A7DCD54B89@fmsmsx124.amr.corp.intel.com> (raw)
In-Reply-To: <20200425230004.GA23991@ziepe.ca>

> Subject: Re: [PATCH] i40iw: Fix error handling in i40iw_manage_arp_cache()
> 
> On Wed, Apr 22, 2020 at 12:22:11PM +0300, Dan Carpenter wrote:
> > The i40iw_arp_table() function can return -EOVERFLOW if
> > i40iw_alloc_resource() fails so we can't just test for "== -1".
> >
> > Fixes: 4e9042e647ff ("i40iw: add hw and utils files")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > drivers/infiniband/hw/i40iw/i40iw_hw.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/i40iw/i40iw_hw.c
> > b/drivers/infiniband/hw/i40iw/i40iw_hw.c
> > index 55a1fbf0e670..ae8b97c30665 100644
> > +++ b/drivers/infiniband/hw/i40iw/i40iw_hw.c
> > @@ -534,7 +534,7 @@ void i40iw_manage_arp_cache(struct i40iw_device
> *iwdev,
> >  	int arp_index;
> >
> >  	arp_index = i40iw_arp_table(iwdev, ip_addr, ipv4, mac_addr, action);
> > -	if (arp_index == -1)
> > +	if (arp_index < 0)
> >  		return;
> >  	cqp_request = i40iw_get_cqp_request(&iwdev->cqp, false);
> >  	if (!cqp_request)
> 
> It is right Shiraz?
> 
Yes. Not convinced i40iw_manage_arp_cache being a void is ok
but that's a separate problem which I ll review internally.

Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>



WARNING: multiple messages have this Message-ID (diff)
From: "Saleem, Shiraz" <shiraz.saleem@intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>, Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Latif, Faisal" <faisal.latif@intel.com>,
	Doug Ledford <dledford@redhat.com>,
	Shannon Nelson <shannon.nelson@intel.com>,
	"Singhai, Anjali" <anjali.singhai@intel.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH] i40iw: Fix error handling in i40iw_manage_arp_cache()
Date: Mon, 27 Apr 2020 17:54:43 +0000	[thread overview]
Message-ID: <9DD61F30A802C4429A01CA4200E302A7DCD54B89@fmsmsx124.amr.corp.intel.com> (raw)
In-Reply-To: <20200425230004.GA23991@ziepe.ca>

> Subject: Re: [PATCH] i40iw: Fix error handling in i40iw_manage_arp_cache()
> 
> On Wed, Apr 22, 2020 at 12:22:11PM +0300, Dan Carpenter wrote:
> > The i40iw_arp_table() function can return -EOVERFLOW if
> > i40iw_alloc_resource() fails so we can't just test for "= -1".
> >
> > Fixes: 4e9042e647ff ("i40iw: add hw and utils files")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > drivers/infiniband/hw/i40iw/i40iw_hw.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/i40iw/i40iw_hw.c
> > b/drivers/infiniband/hw/i40iw/i40iw_hw.c
> > index 55a1fbf0e670..ae8b97c30665 100644
> > +++ b/drivers/infiniband/hw/i40iw/i40iw_hw.c
> > @@ -534,7 +534,7 @@ void i40iw_manage_arp_cache(struct i40iw_device
> *iwdev,
> >  	int arp_index;
> >
> >  	arp_index = i40iw_arp_table(iwdev, ip_addr, ipv4, mac_addr, action);
> > -	if (arp_index = -1)
> > +	if (arp_index < 0)
> >  		return;
> >  	cqp_request = i40iw_get_cqp_request(&iwdev->cqp, false);
> >  	if (!cqp_request)
> 
> It is right Shiraz?
> 
Yes. Not convinced i40iw_manage_arp_cache being a void is ok
but that's a separate problem which I ll review internally.

Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>

  reply	other threads:[~2020-04-27 17:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  9:22 [PATCH] i40iw: Fix error handling in i40iw_manage_arp_cache() Dan Carpenter
2020-04-22  9:22 ` Dan Carpenter
2020-04-25 23:00 ` Jason Gunthorpe
2020-04-25 23:00   ` Jason Gunthorpe
2020-04-27 17:54   ` Saleem, Shiraz [this message]
2020-04-27 17:54     ` Saleem, Shiraz
2020-05-04 17:13 ` Jason Gunthorpe
2020-05-04 17:13   ` Jason Gunthorpe

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=9DD61F30A802C4429A01CA4200E302A7DCD54B89@fmsmsx124.amr.corp.intel.com \
    --to=shiraz.saleem@intel.com \
    --cc=anjali.singhai@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dledford@redhat.com \
    --cc=faisal.latif@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=shannon.nelson@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 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.