linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
@ 2022-02-17 18:19 yanjun.zhu
  2022-02-23  8:46 ` Yanjun Zhu
  2022-02-23 19:32 ` Jason Gunthorpe
  0 siblings, 2 replies; 6+ messages in thread
From: yanjun.zhu @ 2022-02-17 18:19 UTC (permalink / raw)
  To: mustafa.ismail, shiraz.saleem, jgg, linux-rdma, yanjun.zhu, leon

From: Zhu Yanjun <yanjun.zhu@linux.dev>

The function irdma_create_mg_ctx always returns 0,
so make it void and delete the return value check.

Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
 drivers/infiniband/hw/irdma/uda.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/infiniband/hw/irdma/uda.c b/drivers/infiniband/hw/irdma/uda.c
index 7a9988ddbd01..5eeb76bc29fd 100644
--- a/drivers/infiniband/hw/irdma/uda.c
+++ b/drivers/infiniband/hw/irdma/uda.c
@@ -86,8 +86,7 @@ enum irdma_status_code irdma_sc_access_ah(struct irdma_sc_cqp *cqp,
  * irdma_create_mg_ctx() - create a mcg context
  * @info: multicast group context info
  */
-static enum irdma_status_code
-irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
+static void irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
 {
 	struct irdma_mcast_grp_ctx_entry_info *entry_info = NULL;
 	u8 idx = 0; /* index in the array */
@@ -106,8 +105,6 @@ irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
 			ctx_idx++;
 		}
 	}
-
-	return 0;
 }
 
 /**
@@ -135,9 +132,7 @@ enum irdma_status_code irdma_access_mcast_grp(struct irdma_sc_cqp *cqp,
 		return IRDMA_ERR_RING_FULL;
 	}
 
-	ret_code = irdma_create_mg_ctx(info);
-	if (ret_code)
-		return ret_code;
+	irdma_create_mg_ctx(info);
 
 	set_64bit_val(wqe, 32, info->dma_mem_mc.pa);
 	set_64bit_val(wqe, 16,
-- 
2.27.0


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

* Re: [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
  2022-02-17 18:19 [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void yanjun.zhu
@ 2022-02-23  8:46 ` Yanjun Zhu
  2022-02-23 18:00   ` Saleem, Shiraz
  2022-02-23 19:32 ` Jason Gunthorpe
  1 sibling, 1 reply; 6+ messages in thread
From: Yanjun Zhu @ 2022-02-23  8:46 UTC (permalink / raw)
  To: yanjun.zhu, mustafa.ismail, shiraz.saleem, jgg, linux-rdma, leon

在 2022/2/18 2:19, yanjun.zhu@linux.dev 写道:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> The function irdma_create_mg_ctx always returns 0,
> so make it void and delete the return value check.
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>

gentle ping

Zhu Yanjun

> ---
>   drivers/infiniband/hw/irdma/uda.c | 9 ++-------
>   1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/irdma/uda.c b/drivers/infiniband/hw/irdma/uda.c
> index 7a9988ddbd01..5eeb76bc29fd 100644
> --- a/drivers/infiniband/hw/irdma/uda.c
> +++ b/drivers/infiniband/hw/irdma/uda.c
> @@ -86,8 +86,7 @@ enum irdma_status_code irdma_sc_access_ah(struct irdma_sc_cqp *cqp,
>    * irdma_create_mg_ctx() - create a mcg context
>    * @info: multicast group context info
>    */
> -static enum irdma_status_code
> -irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
> +static void irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
>   {
>   	struct irdma_mcast_grp_ctx_entry_info *entry_info = NULL;
>   	u8 idx = 0; /* index in the array */
> @@ -106,8 +105,6 @@ irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
>   			ctx_idx++;
>   		}
>   	}
> -
> -	return 0;
>   }
>   
>   /**
> @@ -135,9 +132,7 @@ enum irdma_status_code irdma_access_mcast_grp(struct irdma_sc_cqp *cqp,
>   		return IRDMA_ERR_RING_FULL;
>   	}
>   
> -	ret_code = irdma_create_mg_ctx(info);
> -	if (ret_code)
> -		return ret_code;
> +	irdma_create_mg_ctx(info);
>   
>   	set_64bit_val(wqe, 32, info->dma_mem_mc.pa);
>   	set_64bit_val(wqe, 16,


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

* RE: [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
  2022-02-23  8:46 ` Yanjun Zhu
@ 2022-02-23 18:00   ` Saleem, Shiraz
  2022-02-24  2:12     ` Yanjun Zhu
  0 siblings, 1 reply; 6+ messages in thread
From: Saleem, Shiraz @ 2022-02-23 18:00 UTC (permalink / raw)
  To: Yanjun Zhu, Ismail, Mustafa, jgg@ziepe.ca,
	linux-rdma@vger.kernel.org, leon@kernel.org

> Subject: Re: [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
> 
> 在 2022/2/18 2:19, yanjun.zhu@linux.dev 写道:
> > From: Zhu Yanjun <yanjun.zhu@linux.dev>
> >
> > The function irdma_create_mg_ctx always returns 0, so make it void and
> > delete the return value check.
> >
> > Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> gentle ping
> 
> Zhu Yanjun
> 
> > ---
> >   drivers/infiniband/hw/irdma/uda.c | 9 ++-------
> >   1 file changed, 2 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/infiniband/hw/irdma/uda.c
> > b/drivers/infiniband/hw/irdma/uda.c
> > index 7a9988ddbd01..5eeb76bc29fd 100644
> > --- a/drivers/infiniband/hw/irdma/uda.c
> > +++ b/drivers/infiniband/hw/irdma/uda.c
> > @@ -86,8 +86,7 @@ enum irdma_status_code irdma_sc_access_ah(struct
> irdma_sc_cqp *cqp,
> >    * irdma_create_mg_ctx() - create a mcg context
> >    * @info: multicast group context info
> >    */
> > -static enum irdma_status_code
> > -irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
> > +static void irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
> >   {
> >   	struct irdma_mcast_grp_ctx_entry_info *entry_info = NULL;
> >   	u8 idx = 0; /* index in the array */ @@ -106,8 +105,6 @@
> > irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
> >   			ctx_idx++;
> >   		}
> >   	}
> > -
> > -	return 0;
> >   }
> >
> >   /**
> > @@ -135,9 +132,7 @@ enum irdma_status_code
> irdma_access_mcast_grp(struct irdma_sc_cqp *cqp,
> >   		return IRDMA_ERR_RING_FULL;
> >   	}
> >
> > -	ret_code = irdma_create_mg_ctx(info);
> > -	if (ret_code)
> > -		return ret_code;
> > +	irdma_create_mg_ctx(info);

ret_code is unused now? Get rid of it?

Shiraz

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

* Re: [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
  2022-02-17 18:19 [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void yanjun.zhu
  2022-02-23  8:46 ` Yanjun Zhu
@ 2022-02-23 19:32 ` Jason Gunthorpe
  2022-02-24  2:13   ` Yanjun Zhu
  1 sibling, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2022-02-23 19:32 UTC (permalink / raw)
  To: yanjun.zhu; +Cc: mustafa.ismail, shiraz.saleem, linux-rdma, leon

On Thu, Feb 17, 2022 at 01:19:38PM -0500, yanjun.zhu@linux.dev wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> The function irdma_create_mg_ctx always returns 0,
> so make it void and delete the return value check.
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
>  drivers/infiniband/hw/irdma/uda.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)

This doesn't apply please rebase it to commit 2322d17abf0a
("RDMA/irdma: Remove excess error variables")

Jason

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

* Re: [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
  2022-02-23 18:00   ` Saleem, Shiraz
@ 2022-02-24  2:12     ` Yanjun Zhu
  0 siblings, 0 replies; 6+ messages in thread
From: Yanjun Zhu @ 2022-02-24  2:12 UTC (permalink / raw)
  To: Saleem, Shiraz, Ismail, Mustafa, jgg@ziepe.ca,
	linux-rdma@vger.kernel.org, leon@kernel.org


在 2022/2/24 2:00, Saleem, Shiraz 写道:
>> Subject: Re: [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
>>
>> 在 2022/2/18 2:19, yanjun.zhu@linux.dev 写道:
>>> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>>>
>>> The function irdma_create_mg_ctx always returns 0, so make it void and
>>> delete the return value check.
>>>
>>> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
>> gentle ping
>>
>> Zhu Yanjun
>>
>>> ---
>>>    drivers/infiniband/hw/irdma/uda.c | 9 ++-------
>>>    1 file changed, 2 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/infiniband/hw/irdma/uda.c
>>> b/drivers/infiniband/hw/irdma/uda.c
>>> index 7a9988ddbd01..5eeb76bc29fd 100644
>>> --- a/drivers/infiniband/hw/irdma/uda.c
>>> +++ b/drivers/infiniband/hw/irdma/uda.c
>>> @@ -86,8 +86,7 @@ enum irdma_status_code irdma_sc_access_ah(struct
>> irdma_sc_cqp *cqp,
>>>     * irdma_create_mg_ctx() - create a mcg context
>>>     * @info: multicast group context info
>>>     */
>>> -static enum irdma_status_code
>>> -irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
>>> +static void irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
>>>    {
>>>    	struct irdma_mcast_grp_ctx_entry_info *entry_info = NULL;
>>>    	u8 idx = 0; /* index in the array */ @@ -106,8 +105,6 @@
>>> irdma_create_mg_ctx(struct irdma_mcast_grp_info *info)
>>>    			ctx_idx++;
>>>    		}
>>>    	}
>>> -
>>> -	return 0;
>>>    }
>>>
>>>    /**
>>> @@ -135,9 +132,7 @@ enum irdma_status_code
>> irdma_access_mcast_grp(struct irdma_sc_cqp *cqp,
>>>    		return IRDMA_ERR_RING_FULL;
>>>    	}
>>>
>>> -	ret_code = irdma_create_mg_ctx(info);
>>> -	if (ret_code)
>>> -		return ret_code;
>>> +	irdma_create_mg_ctx(info);
> ret_code is unused now? Get rid of it?

Thanks, it is removed in the latest commit.

Zhu Yanjun

>
> Shiraz

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

* Re: [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void
  2022-02-23 19:32 ` Jason Gunthorpe
@ 2022-02-24  2:13   ` Yanjun Zhu
  0 siblings, 0 replies; 6+ messages in thread
From: Yanjun Zhu @ 2022-02-24  2:13 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: mustafa.ismail, shiraz.saleem, linux-rdma, leon


在 2022/2/24 3:32, Jason Gunthorpe 写道:
> On Thu, Feb 17, 2022 at 01:19:38PM -0500, yanjun.zhu@linux.dev wrote:
>> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>>
>> The function irdma_create_mg_ctx always returns 0,
>> so make it void and delete the return value check.
>>
>> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
>> ---
>>   drivers/infiniband/hw/irdma/uda.c | 9 ++-------
>>   1 file changed, 2 insertions(+), 7 deletions(-)
> This doesn't apply please rebase it to commit 2322d17abf0a
> ("RDMA/irdma: Remove excess error variables")
Thanks. Now the latest commit is on the commit 2322d17abf0a

("RDMA/irdma: Remove excess error variables").


Zhu Yanjun

>
> Jason

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

end of thread, other threads:[~2022-02-24  2:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 18:19 [PATCH 1/1] RDMA/irdma: Make irdma_create_mg_ctx return a void yanjun.zhu
2022-02-23  8:46 ` Yanjun Zhu
2022-02-23 18:00   ` Saleem, Shiraz
2022-02-24  2:12     ` Yanjun Zhu
2022-02-23 19:32 ` Jason Gunthorpe
2022-02-24  2:13   ` Yanjun Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).