git: bbe42332e5b2 - main - bnxt_re: Explicitly cast pointer-to-integer conversions

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 28 May 2024 13:13:06 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=bbe42332e5b2cbe16a885360fad4462d13c7b357

commit bbe42332e5b2cbe16a885360fad4462d13c7b357
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-05-28 13:04:21 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-05-28 13:12:42 +0000

    bnxt_re: Explicitly cast pointer-to-integer conversions
    
    Reported by:    Jenkins
    Fixes:  acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
---
 sys/dev/bnxt/bnxt_re/qplib_fp.c | 2 +-
 sys/dev/bnxt/bnxt_re/qplib_sp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/bnxt/bnxt_re/qplib_fp.c b/sys/dev/bnxt/bnxt_re/qplib_fp.c
index 438f7ddd468e..3f1b02406f7f 100644
--- a/sys/dev/bnxt/bnxt_re/qplib_fp.c
+++ b/sys/dev/bnxt/bnxt_re/qplib_fp.c
@@ -660,7 +660,7 @@ int bnxt_qplib_create_srq(struct bnxt_qplib_res *res,
 		goto exit;
 	/* Configure the request */
 	req.dpi = cpu_to_le32(srq->dpi->dpi);
-	req.srq_handle = cpu_to_le64(srq);
+	req.srq_handle = cpu_to_le64((uintptr_t)srq);
 	srq_size = min_t(u32, srq->hwq.depth, U16_MAX);
 	req.srq_size = cpu_to_le16(srq_size);
 	pg_sz_lvl |= (_get_base_pg_size(&srq->hwq) <<
diff --git a/sys/dev/bnxt/bnxt_re/qplib_sp.c b/sys/dev/bnxt/bnxt_re/qplib_sp.c
index 8faa3cd9390c..c414718a816f 100644
--- a/sys/dev/bnxt/bnxt_re/qplib_sp.c
+++ b/sys/dev/bnxt/bnxt_re/qplib_sp.c
@@ -582,7 +582,7 @@ int bnxt_qplib_alloc_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw)
 	    mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A ||
 	    mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B)
 		req.access = CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY;
-	req.mrw_handle = cpu_to_le64(mrw);
+	req.mrw_handle = cpu_to_le64((uintptr_t)mrw);
 
 	bnxt_qplib_fill_cmdqmsg(&msg, &req, &resp, NULL, sizeof(req),
 				sizeof(resp), 0);