linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 rdma-next] RDMA/bnxt_re: improve clarity in ALLOC_PAGE handler
@ 2025-09-24 11:01 Alok Tiwari
  2025-09-24 13:56 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Alok Tiwari @ 2025-09-24 11:01 UTC (permalink / raw)
  To: selvin.xavier, kalesh-anakkur.purayil, jgg, leon, linux-rdma
  Cc: alok.a.tiwari, linux-kernel

Update uverbs_copy_to call to use sizeof(dpi) instead of sizeof(length)
when copying the device page index (DPI) back to user space. Both dpi
and length are declared as u32, so this change has no functional impact
but makes the code clearer.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
v1 ->  v2
added Reviewed-by: Kalesh AP
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 8236d82e9a67..4dab5ca7362b 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -4746,7 +4746,7 @@ static int UVERBS_HANDLER(BNXT_RE_METHOD_ALLOC_PAGE)(struct uverbs_attr_bundle *
 		return err;
 
 	err = uverbs_copy_to(attrs, BNXT_RE_ALLOC_PAGE_DPI,
-			     &dpi, sizeof(length));
+			     &dpi, sizeof(dpi));
 	if (err)
 		return err;
 
-- 
2.50.1


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

end of thread, other threads:[~2025-09-24 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 11:01 [PATCH v2 rdma-next] RDMA/bnxt_re: improve clarity in ALLOC_PAGE handler Alok Tiwari
2025-09-24 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).