Commit dea8c09c authored by Daniel Vetter's avatar Daniel Vetter

xen/gntdev-dmabuf: Ditch dummy map functions

There's no in-kernel users for the k(un)map stuff. And the mmap one is
actively harmful - return 0 and then _not_ actually mmaping can't end
well.
Acked-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org
Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-14-daniel.vetter@ffwll.ch
parent 42aa7c6e
...@@ -342,35 +342,12 @@ static void dmabuf_exp_ops_release(struct dma_buf *dma_buf) ...@@ -342,35 +342,12 @@ static void dmabuf_exp_ops_release(struct dma_buf *dma_buf)
mutex_unlock(&priv->lock); mutex_unlock(&priv->lock);
} }
static void *dmabuf_exp_ops_kmap(struct dma_buf *dma_buf,
unsigned long page_num)
{
/* Not implemented. */
return NULL;
}
static void dmabuf_exp_ops_kunmap(struct dma_buf *dma_buf,
unsigned long page_num, void *addr)
{
/* Not implemented. */
}
static int dmabuf_exp_ops_mmap(struct dma_buf *dma_buf,
struct vm_area_struct *vma)
{
/* Not implemented. */
return 0;
}
static const struct dma_buf_ops dmabuf_exp_ops = { static const struct dma_buf_ops dmabuf_exp_ops = {
.attach = dmabuf_exp_ops_attach, .attach = dmabuf_exp_ops_attach,
.detach = dmabuf_exp_ops_detach, .detach = dmabuf_exp_ops_detach,
.map_dma_buf = dmabuf_exp_ops_map_dma_buf, .map_dma_buf = dmabuf_exp_ops_map_dma_buf,
.unmap_dma_buf = dmabuf_exp_ops_unmap_dma_buf, .unmap_dma_buf = dmabuf_exp_ops_unmap_dma_buf,
.release = dmabuf_exp_ops_release, .release = dmabuf_exp_ops_release,
.map = dmabuf_exp_ops_kmap,
.unmap = dmabuf_exp_ops_kunmap,
.mmap = dmabuf_exp_ops_mmap,
}; };
struct gntdev_dmabuf_export_args { struct gntdev_dmabuf_export_args {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment