[PATCH] RDMA/umem: Fix the ib_umem_dmabuf_get() prototype
Christophe JAILLET <[email protected]> Sun, 19 Jul 2026 23:16:17 +0200
| Newsgroups | org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rdma |
|---|---|
| Message-ID | <f450b272eff7c0f0d3c1a5f08d27ebc042704f76.1784495762.git.christophe.jaillet@wanadoo.fr> |
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 <[email protected]>
---
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