Skip to content

Commit fb0b082

Browse files
aloktiwajgunthorpe
authored andcommitted
RDMA/bnxt_re: improve clarity in ALLOC_PAGE handler
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. Link: https://patch.msgid.link/r/[email protected] Signed-off-by: Alok Tiwari <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 880245f commit fb0b082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4750,7 +4750,7 @@ static int UVERBS_HANDLER(BNXT_RE_METHOD_ALLOC_PAGE)(struct uverbs_attr_bundle *
47504750
return err;
47514751

47524752
err = uverbs_copy_to(attrs, BNXT_RE_ALLOC_PAGE_DPI,
4753-
&dpi, sizeof(length));
4753+
&dpi, sizeof(dpi));
47544754
if (err)
47554755
return err;
47564756

0 commit comments

Comments
 (0)