public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i40iw: Set maj_err and min_err in i40iw_sc_cqp_create
@ 2017-01-18 17:48 Shiraz Saleem
       [not found] ` <1484761709-6072-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Shiraz Saleem @ 2017-01-18 17:48 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, Shiraz Saleem

Set maj_err and min_err in i40iw_sc_cqp_create so that it
returns correct values for all return cases. This also
addresses an uninitialized variable warning for maj_err and
min_err in i40iw_create_cqp.

Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reported-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
index 2c4b4d0..47a2529 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
@@ -315,6 +315,9 @@ static enum i40iw_status_code i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp,
 	u32 cnt = 0, p1, p2, val = 0, err_code;
 	enum i40iw_status_code ret_code;
 
+	*maj_err = 0;
+	*min_err = 0;
+
 	ret_code = i40iw_allocate_dma_mem(cqp->dev->hw,
 					  &cqp->sdbuf,
 					  128,
-- 
2.8.0

--
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] i40iw: Set maj_err and min_err in i40iw_sc_cqp_create
       [not found] ` <1484761709-6072-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2017-01-18 19:54   ` Yuval Shaia
  2017-01-24 21:23     ` Doug Ledford
  0 siblings, 1 reply; 3+ messages in thread
From: Yuval Shaia @ 2017-01-18 19:54 UTC (permalink / raw)
  To: Shiraz Saleem
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA

On Wed, Jan 18, 2017 at 11:48:29AM -0600, Shiraz Saleem wrote:
> Set maj_err and min_err in i40iw_sc_cqp_create so that it
> returns correct values for all return cases. This also
> addresses an uninitialized variable warning for maj_err and
> min_err in i40iw_create_cqp.
> 
> Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reported-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> index 2c4b4d0..47a2529 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> @@ -315,6 +315,9 @@ static enum i40iw_status_code i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp,
>  	u32 cnt = 0, p1, p2, val = 0, err_code;
>  	enum i40iw_status_code ret_code;
>  
> +	*maj_err = 0;
> +	*min_err = 0;
> +

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

>  	ret_code = i40iw_allocate_dma_mem(cqp->dev->hw,
>  					  &cqp->sdbuf,
>  					  128,
> -- 
> 2.8.0
> 
--
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] i40iw: Set maj_err and min_err in i40iw_sc_cqp_create
  2017-01-18 19:54   ` Yuval Shaia
@ 2017-01-24 21:23     ` Doug Ledford
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-01-24 21:23 UTC (permalink / raw)
  To: Yuval Shaia, Shiraz Saleem; +Cc: linux-rdma, kernel-janitors, dan.carpenter

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

On Wed, 2017-01-18 at 21:54 +0200, Yuval Shaia wrote:
> On Wed, Jan 18, 2017 at 11:48:29AM -0600, Shiraz Saleem wrote:
> > 
> > Set maj_err and min_err in i40iw_sc_cqp_create so that it
> > returns correct values for all return cases. This also
> > addresses an uninitialized variable warning for maj_err and
> > min_err in i40iw_create_cqp.
> > 
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Reported-by: Yuval Shaia <yuval.shaia@oracle.com>
> > Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> > ---
> >  drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> > b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> > index 2c4b4d0..47a2529 100644
> > --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> > +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> > @@ -315,6 +315,9 @@ static enum i40iw_status_code
> > i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp,
> >  	u32 cnt = 0, p1, p2, val = 0, err_code;
> >  	enum i40iw_status_code ret_code;
> >  
> > +	*maj_err = 0;
> > +	*min_err = 0;
> > +
> 
> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>

Thanks, applied to -next.

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2017-01-24 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-18 17:48 [PATCH] i40iw: Set maj_err and min_err in i40iw_sc_cqp_create Shiraz Saleem
     [not found] ` <1484761709-6072-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-18 19:54   ` Yuval Shaia
2017-01-24 21:23     ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox