[PATCH] RDMA/umem: Fix the ib_umem_dmabuf_get() prototype
From: Christophe JAILLET
Date: Sun Jul 19 2026 - 17:19:00 EST
If CONFIG_INFINIBAND_USER_MEM is not defined, then the last parameter of
ib_umem_dmabuf_get() is missing a const qualifier in order to match its
prototype.
This is an issue since commit dcae56cfecc6 ("RDMA/mlx5: Constify struct
ib_frmr_pool_ops and dma_buf_attach_ops") because now a "const struct
dma_buf_attach_ops *o" can really be passed to the function.
Fixes: dcae56cfecc6 ("RDMA/mlx5: Constify struct ib_frmr_pool_ops and dma_buf_attach_ops")
Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
include/rdma/ib_umem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
index 31b3a86fe73a..1fe87fd1d769 100644
--- a/include/rdma/ib_umem.h
+++ b/include/rdma/ib_umem.h
@@ -250,7 +250,7 @@ struct ib_umem_dmabuf *ib_umem_dmabuf_get(struct ib_device *device,
unsigned long offset,
size_t size, int fd,
int access,
- struct dma_buf_attach_ops *ops)
+ const struct dma_buf_attach_ops *ops)
{
return ERR_PTR(-EOPNOTSUPP);
}
--
2.55.0