All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/core: Clean up a variable name in ib_create_srq_user()
@ 2022-09-22 11:22 Dan Carpenter
  2022-09-22 11:34 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-09-22 11:22 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Leon Romanovsky, Mark Zhang, Yajun Deng, Maor Gottlieb,
	Aharon Landau, linux-rdma, kernel-janitors

"&srq->pd->usecnt" and "&pd->usecnt" are different names for the same
reference count.  Use "&pd->usecnt" consistently for both the increment
and decrement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/infiniband/core/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index e54b3f1b730e..e36368a4728d 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1038,7 +1038,7 @@ struct ib_srq *ib_create_srq_user(struct ib_pd *pd,
 	ret = pd->device->ops.create_srq(srq, srq_init_attr, udata);
 	if (ret) {
 		rdma_restrack_put(&srq->res);
-		atomic_dec(&srq->pd->usecnt);
+		atomic_dec(&pd->usecnt);
 		if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd)
 			atomic_dec(&srq->ext.xrc.xrcd->usecnt);
 		if (ib_srq_has_cq(srq->srq_type))
-- 
2.35.1


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

* Re: [PATCH] RDMA/core: Clean up a variable name in ib_create_srq_user()
  2022-09-22 11:22 [PATCH] RDMA/core: Clean up a variable name in ib_create_srq_user() Dan Carpenter
@ 2022-09-22 11:34 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2022-09-22 11:34 UTC (permalink / raw)
  To: Dan Carpenter, Jason Gunthorpe
  Cc: Yajun Deng, linux-rdma, kernel-janitors, Mark Zhang,
	Maor Gottlieb, Aharon Landau

On Thu, 22 Sep 2022 14:22:35 +0300, Dan Carpenter wrote:
> "&srq->pd->usecnt" and "&pd->usecnt" are different names for the same
> reference count.  Use "&pd->usecnt" consistently for both the increment
> and decrement.
> 
> 

Applied, thanks!

[1/1] RDMA/core: Clean up a variable name in ib_create_srq_user()
      https://git.kernel.org/rdma/rdma/c/b300729b77b0b7

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>

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

end of thread, other threads:[~2022-09-22 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22 11:22 [PATCH] RDMA/core: Clean up a variable name in ib_create_srq_user() Dan Carpenter
2022-09-22 11:34 ` Leon Romanovsky

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.