* [PATCH] RDMA/umem: Fix the ib_umem_dmabuf_get() prototype
@ 2026-07-19 21:16 Christophe JAILLET
2026-07-20 13:01 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2026-07-19 21:16 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-rdma
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@wanadoo.fr>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] RDMA/umem: Fix the ib_umem_dmabuf_get() prototype
2026-07-19 21:16 [PATCH] RDMA/umem: Fix the ib_umem_dmabuf_get() prototype Christophe JAILLET
@ 2026-07-20 13:01 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2026-07-20 13:01 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Jason Gunthorpe, linux-kernel, kernel-janitors, linux-rdma
On Sun, Jul 19, 2026 at 11:16:17PM +0200, Christophe JAILLET wrote:
> 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")
I squashed that fix to the problematic commit.
Thanks
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-20 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 21:16 [PATCH] RDMA/umem: Fix the ib_umem_dmabuf_get() prototype Christophe JAILLET
2026-07-20 13:01 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox