All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iser-target: fix error return code in isert_create_device_ib_res()
@ 2013-10-29  1:56 Wei Yongjun
       [not found] ` <CAPgLHd8eEFhMyfieCULgj+OzCRrTMN9G60pAvTP0+zOhBeK=qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-10-29  1:56 UTC (permalink / raw
  To: roland-DgEjT+Ai2ygdnm+yROfE0A, sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w, nab-IzHhD5pYlfBP7FQvKIMDCQ,
	vu-VPRAkNaXOzVWk0Htik3J/w, sagig-VPRAkNaXOzVWk0Htik3J/w,
	ogerlitz-VPRAkNaXOzVWk0Htik3J/w, jkosina-AlSwsSmVLrQ
  Cc: yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 6df2350..2ba71c0 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -263,21 +263,29 @@ isert_create_device_ib_res(struct isert_device *device)
 						isert_cq_event_callback,
 						(void *)&cq_desc[i],
 						ISER_MAX_RX_CQ_LEN, i);
-		if (IS_ERR(device->dev_rx_cq[i]))
+		if (IS_ERR(device->dev_rx_cq[i])) {
+			ret = PTR_ERR(device->dev_rx_cq[i]);
+			device->dev_rx_cq[i] = NULL;
 			goto out_cq;
+		}
 
 		device->dev_tx_cq[i] = ib_create_cq(device->ib_device,
 						isert_cq_tx_callback,
 						isert_cq_event_callback,
 						(void *)&cq_desc[i],
 						ISER_MAX_TX_CQ_LEN, i);
-		if (IS_ERR(device->dev_tx_cq[i]))
+		if (IS_ERR(device->dev_tx_cq[i])) {
+			ret = PTR_ERR(device->dev_tx_cq[i]);
+			device->dev_tx_cq[i] = NULL;
 			goto out_cq;
+		}
 
-		if (ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP))
+		ret = ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP);
+		if (ret)
 			goto out_cq;
 
-		if (ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP))
+		ret = ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP);
+		if (ret)
 			goto out_cq;
 	}
 

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iser-target: fix error return code in isert_create_device_ib_res()
       [not found] ` <CAPgLHd8eEFhMyfieCULgj+OzCRrTMN9G60pAvTP0+zOhBeK=qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-12-02 14:00   ` Jiri Kosina
  2013-12-11 19:57     ` Nicholas A. Bellinger
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2013-12-02 14:00 UTC (permalink / raw
  To: Wei Yongjun
  Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w, nab-IzHhD5pYlfBP7FQvKIMDCQ,
	vu-VPRAkNaXOzVWk0Htik3J/w, sagig-VPRAkNaXOzVWk0Htik3J/w,
	ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Tue, 29 Oct 2013, Wei Yongjun wrote:

> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>

This one has been sitting in my queue for quite some time, but I'd like 
the actual infiniband maintainers to be acted upon by.

Roland, please?

> ---
>  drivers/infiniband/ulp/isert/ib_isert.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
> index 6df2350..2ba71c0 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.c
> +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> @@ -263,21 +263,29 @@ isert_create_device_ib_res(struct isert_device *device)
>  						isert_cq_event_callback,
>  						(void *)&cq_desc[i],
>  						ISER_MAX_RX_CQ_LEN, i);
> -		if (IS_ERR(device->dev_rx_cq[i]))
> +		if (IS_ERR(device->dev_rx_cq[i])) {
> +			ret = PTR_ERR(device->dev_rx_cq[i]);
> +			device->dev_rx_cq[i] = NULL;
>  			goto out_cq;
> +		}
>  
>  		device->dev_tx_cq[i] = ib_create_cq(device->ib_device,
>  						isert_cq_tx_callback,
>  						isert_cq_event_callback,
>  						(void *)&cq_desc[i],
>  						ISER_MAX_TX_CQ_LEN, i);
> -		if (IS_ERR(device->dev_tx_cq[i]))
> +		if (IS_ERR(device->dev_tx_cq[i])) {
> +			ret = PTR_ERR(device->dev_tx_cq[i]);
> +			device->dev_tx_cq[i] = NULL;
>  			goto out_cq;
> +		}
>  
> -		if (ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP))
> +		ret = ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP);
> +		if (ret)
>  			goto out_cq;
>  
> -		if (ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP))
> +		ret = ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP);
> +		if (ret)
>  			goto out_cq;
>  	}
>  
> 

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iser-target: fix error return code in isert_create_device_ib_res()
  2013-12-02 14:00   ` Jiri Kosina
@ 2013-12-11 19:57     ` Nicholas A. Bellinger
  0 siblings, 0 replies; 3+ messages in thread
From: Nicholas A. Bellinger @ 2013-12-11 19:57 UTC (permalink / raw
  To: Jiri Kosina
  Cc: Wei Yongjun, roland, sean.hefty, hal.rosenstock, vu, sagig,
	ogerlitz, yongjun_wei, linux-rdma, target-devel

On Mon, 2013-12-02 at 15:00 +0100, Jiri Kosina wrote:
> On Tue, 29 Oct 2013, Wei Yongjun wrote:
> 
> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > 
> > Fix to return a negative error code from the error handling
> > case instead of 0, as done elsewhere in this function.
> > 
> > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> This one has been sitting in my queue for quite some time, but I'd like 
> the actual infiniband maintainers to be acted upon by.
> 
> Roland, please?

Hi Jiri, Wei & Co,

Apologies for missing this one earlier..

This patch has been queued with a CC' for v3.10+ stable to
target-pending/master, and will be included in the next for-v3.13 fixes
PULL request.

Thank you,

--nab

> 
> > ---
> >  drivers/infiniband/ulp/isert/ib_isert.c | 16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
> > index 6df2350..2ba71c0 100644
> > --- a/drivers/infiniband/ulp/isert/ib_isert.c
> > +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> > @@ -263,21 +263,29 @@ isert_create_device_ib_res(struct isert_device *device)
> >  						isert_cq_event_callback,
> >  						(void *)&cq_desc[i],
> >  						ISER_MAX_RX_CQ_LEN, i);
> > -		if (IS_ERR(device->dev_rx_cq[i]))
> > +		if (IS_ERR(device->dev_rx_cq[i])) {
> > +			ret = PTR_ERR(device->dev_rx_cq[i]);
> > +			device->dev_rx_cq[i] = NULL;
> >  			goto out_cq;
> > +		}
> >  
> >  		device->dev_tx_cq[i] = ib_create_cq(device->ib_device,
> >  						isert_cq_tx_callback,
> >  						isert_cq_event_callback,
> >  						(void *)&cq_desc[i],
> >  						ISER_MAX_TX_CQ_LEN, i);
> > -		if (IS_ERR(device->dev_tx_cq[i]))
> > +		if (IS_ERR(device->dev_tx_cq[i])) {
> > +			ret = PTR_ERR(device->dev_tx_cq[i]);
> > +			device->dev_tx_cq[i] = NULL;
> >  			goto out_cq;
> > +		}
> >  
> > -		if (ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP))
> > +		ret = ib_req_notify_cq(device->dev_rx_cq[i], IB_CQ_NEXT_COMP);
> > +		if (ret)
> >  			goto out_cq;
> >  
> > -		if (ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP))
> > +		ret = ib_req_notify_cq(device->dev_tx_cq[i], IB_CQ_NEXT_COMP);
> > +		if (ret)
> >  			goto out_cq;
> >  	}
> >  
> > 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-11 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29  1:56 [PATCH] iser-target: fix error return code in isert_create_device_ib_res() Wei Yongjun
     [not found] ` <CAPgLHd8eEFhMyfieCULgj+OzCRrTMN9G60pAvTP0+zOhBeK=qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-02 14:00   ` Jiri Kosina
2013-12-11 19:57     ` Nicholas A. Bellinger

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.