From: Alok Tiwari Date: Wed, 24 Sep 2025 11:01:27 +0000 (-0700) Subject: RDMA/bnxt_re: improve clarity in ALLOC_PAGE handler X-Git-Tag: v6.18-rc1~102^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb0b08297ecb429b60cb2b6ed40632ce5294220c;p=thirdparty%2Fkernel%2Fstable.git 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/20250924110130.340195-1-alok.a.tiwari@oracle.com Signed-off-by: Alok Tiwari Reviewed-by: Kalesh AP Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index 2639ca21a0271..8f2c242c578b6 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -4750,7 +4750,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;