linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma-buf: fix sanity check in dma_buf_export
@ 2018-08-08  6:25 Gerd Hoffmann
  2018-08-08  8:26 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2018-08-08  6:25 UTC (permalink / raw)
  To: dri-devel
  Cc: Chris Wilson, Gerd Hoffmann, Sumit Semwal,
	open list:DMA BUFFER SHARING FRAMEWORK,
	moderated list:DMA BUFFER SHARING FRAMEWORK, open list

Commit 09ea0dfbf972 made map_atomic and map function pointers optional,
but didn't adapt the sanity check in dma_buf_export.  Fix that.

Note that the atomic map interface has been removed altogether meanwhile
(commit f664a52695), therefore we have to remove the map check only.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/dma-buf/dma-buf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 13884474d1..02f7f9a899 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -405,7 +405,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
 			  || !exp_info->ops->map_dma_buf
 			  || !exp_info->ops->unmap_dma_buf
 			  || !exp_info->ops->release
-			  || !exp_info->ops->map
 			  || !exp_info->ops->mmap)) {
 		return ERR_PTR(-EINVAL);
 	}
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dma-buf: fix sanity check in dma_buf_export
  2018-08-08  6:25 [PATCH] dma-buf: fix sanity check in dma_buf_export Gerd Hoffmann
@ 2018-08-08  8:26 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2018-08-08  8:26 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: dri-devel, open list,
	moderated list:DMA BUFFER SHARING FRAMEWORK,
	open list:DMA BUFFER SHARING FRAMEWORK

On Wed, Aug 08, 2018 at 08:25:40AM +0200, Gerd Hoffmann wrote:
> Commit 09ea0dfbf972 made map_atomic and map function pointers optional,
> but didn't adapt the sanity check in dma_buf_export.  Fix that.
> 
> Note that the atomic map interface has been removed altogether meanwhile
> (commit f664a52695), therefore we have to remove the map check only.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Chris Wilson just submitted the exact same patch ...
-Daniel

> ---
>  drivers/dma-buf/dma-buf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 13884474d1..02f7f9a899 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -405,7 +405,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
>  			  || !exp_info->ops->map_dma_buf
>  			  || !exp_info->ops->unmap_dma_buf
>  			  || !exp_info->ops->release
> -			  || !exp_info->ops->map
>  			  || !exp_info->ops->mmap)) {
>  		return ERR_PTR(-EINVAL);
>  	}
> -- 
> 2.9.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-08 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08  6:25 [PATCH] dma-buf: fix sanity check in dma_buf_export Gerd Hoffmann
2018-08-08  8:26 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).