From 59c3797076f61e822ecfc4e919dd1fa53931008e Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 18 Nov 2019 11:35:35 +0100 Subject: sample/vfio-mdev/mbocs: Remove dma_buf_k(un)map support No in-tree users left. Acked-by: Sumit Semwal Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Kirti Wankhede Cc: kvm@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-15-daniel.vetter@ffwll.ch --- samples/vfio-mdev/mbochs.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'samples') diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c index ac5c8c17b1ff..3cc5e5921682 100644 --- a/samples/vfio-mdev/mbochs.c +++ b/samples/vfio-mdev/mbochs.c @@ -891,26 +891,10 @@ static void mbochs_release_dmabuf(struct dma_buf *buf) mutex_unlock(&mdev_state->ops_lock); } -static void *mbochs_kmap_dmabuf(struct dma_buf *buf, unsigned long page_num) -{ - struct mbochs_dmabuf *dmabuf = buf->priv; - struct page *page = dmabuf->pages[page_num]; - - return kmap(page); -} - -static void mbochs_kunmap_dmabuf(struct dma_buf *buf, unsigned long page_num, - void *vaddr) -{ - kunmap(vaddr); -} - static struct dma_buf_ops mbochs_dmabuf_ops = { .map_dma_buf = mbochs_map_dmabuf, .unmap_dma_buf = mbochs_unmap_dmabuf, .release = mbochs_release_dmabuf, - .map = mbochs_kmap_dmabuf, - .unmap = mbochs_kunmap_dmabuf, .mmap = mbochs_mmap_dmabuf, }; -- cgit v1.2.3 From b0077e521c8af7761404ae772a328e5f0bf15094 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 3 Dec 2019 18:38:53 +0200 Subject: samples: vfio-mdev: constify fb ops Now that the fbops member of struct fb_info is const, we can start making the ops const as well. v2: fix typo (Christophe de Dinechin) Cc: Kirti Wankhede Cc: kvm@vger.kernel.org Reviewed-by: Daniel Vetter Acked-by: Kirti Wankhede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ddb10df1316ef585930cda7718643a580f4fe37b.1575390741.git.jani.nikula@intel.com --- samples/vfio-mdev/mdpy-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samples') diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c index 2719bb259653..21dbf63d6e41 100644 --- a/samples/vfio-mdev/mdpy-fb.c +++ b/samples/vfio-mdev/mdpy-fb.c @@ -86,7 +86,7 @@ static void mdpy_fb_destroy(struct fb_info *info) iounmap(info->screen_base); } -static struct fb_ops mdpy_fb_ops = { +static const struct fb_ops mdpy_fb_ops = { .owner = THIS_MODULE, .fb_destroy = mdpy_fb_destroy, .fb_setcolreg = mdpy_fb_setcolreg, -- cgit v1.2.3