Re: [PATCH v3 1/7] dma-buf: Rename .move_notify() callback to a clearer identifier
From: Leon Romanovsky
Date: Wed Jan 21 2026 - 03:44:58 EST
On Wed, Jan 21, 2026 at 09:33:27AM +0100, Christian König wrote:
> On 1/20/26 15:07, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@xxxxxxxxxx>
> >
> > Rename the .move_notify() callback to .invalidate_mappings() to make its
> > purpose explicit and highlight that it is responsible for invalidating
> > existing mappings.
> >
> > Suggested-by: Christian König <christian.koenig@xxxxxxx>
> > Reviewed-by: Christian König <christian.koenig@xxxxxxx>
> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
> > ---
> > drivers/dma-buf/dma-buf.c | 6 +++---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 ++--
> > drivers/gpu/drm/virtio/virtgpu_prime.c | 2 +-
> > drivers/gpu/drm/xe/tests/xe_dma_buf.c | 6 +++---
> > drivers/gpu/drm/xe/xe_dma_buf.c | 2 +-
> > drivers/infiniband/core/umem_dmabuf.c | 4 ++--
> > drivers/infiniband/hw/mlx5/mr.c | 2 +-
> > drivers/iommu/iommufd/pages.c | 2 +-
> > include/linux/dma-buf.h | 6 +++---
> > 9 files changed, 17 insertions(+), 17 deletions(-)
<...>
> > attach = kzalloc(sizeof(*attach), GFP_KERNEL);
> > @@ -1055,7 +1055,7 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_pin, "DMA_BUF");
> > *
> > * This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move
> > * any mapping of @attach again and inform the importer through
> > - * &dma_buf_attach_ops.move_notify.
> > + * &dma_buf_attach_ops.invalidate_mappings.
> > */
> > void dma_buf_unpin(struct dma_buf_attachment *attach)
> > {
> > @@ -1262,7 +1262,7 @@ void dma_buf_move_notify(struct dma_buf *dmabuf)
>
> Thinking more about it we can keep the function names as they are in the importers, but renaming renaming this framework function as well would be really nice to have.
Let me prepare an additional patch on top of this series. I'd prefer to
avoid unnecessary resubmissions caused solely by renaming.
Thanks
>
> Regards,
> Christian.