linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] RDMA/irdma: Remove the redundant variable
@ 2022-03-23 23:01 Zhu Yanjun
  2022-03-24 19:53 ` Leon Romanovsky
  2022-04-04 13:56 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Zhu Yanjun @ 2022-03-23 23:01 UTC (permalink / raw)
  To: mustafa.ismail, shiraz.saleem, jgg, linux-rdma, yanjun.zhu

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

In the function irdma_puda_get_next_send_wqe, the variable wqe
is not necessary. So remove it.

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

diff --git a/drivers/infiniband/hw/irdma/puda.c b/drivers/infiniband/hw/irdma/puda.c
index 58e7d875643b..91aea3198edb 100644
--- a/drivers/infiniband/hw/irdma/puda.c
+++ b/drivers/infiniband/hw/irdma/puda.c
@@ -193,7 +193,6 @@ static void irdma_puda_dele_buf(struct irdma_sc_dev *dev,
 static __le64 *irdma_puda_get_next_send_wqe(struct irdma_qp_uk *qp,
 					    u32 *wqe_idx)
 {
-	__le64 *wqe = NULL;
 	enum irdma_status_code ret_code = 0;
 
 	*wqe_idx = IRDMA_RING_CURRENT_HEAD(qp->sq_ring);
@@ -201,11 +200,9 @@ static __le64 *irdma_puda_get_next_send_wqe(struct irdma_qp_uk *qp,
 		qp->swqe_polarity = !qp->swqe_polarity;
 	IRDMA_RING_MOVE_HEAD(qp->sq_ring, ret_code);
 	if (ret_code)
-		return wqe;
-
-	wqe = qp->sq_base[*wqe_idx].elem;
+		return NULL;
 
-	return wqe;
+	return qp->sq_base[*wqe_idx].elem;
 }
 
 /**
-- 
2.27.0


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

* Re: [PATCH 1/1] RDMA/irdma: Remove the redundant variable
  2022-03-23 23:01 [PATCH 1/1] RDMA/irdma: Remove the redundant variable Zhu Yanjun
@ 2022-03-24 19:53 ` Leon Romanovsky
  2022-04-04 13:56 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2022-03-24 19:53 UTC (permalink / raw)
  To: Zhu Yanjun; +Cc: mustafa.ismail, shiraz.saleem, jgg, linux-rdma, yanjun.zhu

On Wed, Mar 23, 2022 at 07:01:35PM -0400, Zhu Yanjun wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> In the function irdma_puda_get_next_send_wqe, the variable wqe
> is not necessary. So remove it.
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
>  drivers/infiniband/hw/irdma/puda.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

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

* Re: [PATCH 1/1] RDMA/irdma: Remove the redundant variable
  2022-03-23 23:01 [PATCH 1/1] RDMA/irdma: Remove the redundant variable Zhu Yanjun
  2022-03-24 19:53 ` Leon Romanovsky
@ 2022-04-04 13:56 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2022-04-04 13:56 UTC (permalink / raw)
  To: Zhu Yanjun; +Cc: mustafa.ismail, shiraz.saleem, linux-rdma, yanjun.zhu

On Wed, Mar 23, 2022 at 07:01:35PM -0400, Zhu Yanjun wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> In the function irdma_puda_get_next_send_wqe, the variable wqe
> is not necessary. So remove it.
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/hw/irdma/puda.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)

Applied to for-next, thanks

Jason

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

end of thread, other threads:[~2022-04-04 13:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23 23:01 [PATCH 1/1] RDMA/irdma: Remove the redundant variable Zhu Yanjun
2022-03-24 19:53 ` Leon Romanovsky
2022-04-04 13:56 ` Jason Gunthorpe

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).