All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma-buf: Correct dummy function declarations.
@ 2012-03-23 15:49 ` Sumit Semwal
  0 siblings, 0 replies; 3+ messages in thread
From: Sumit Semwal @ 2012-03-23 15:49 UTC (permalink / raw)
  To: daniel.vetter
  Cc: dri-devel, linaro-mm-sig, linux-media, Sumit Semwal, Sumit Semwal

While testing, I found that we need to correct some of the dummy declarations. When I send my pull request to Linus, I wish to squash these changes into the original patches from Daniel. Could you please review?

Best regards,
~Sumit

=========

Dummy functions for the newly added cpu access ops are needed for compilation
when dma-buf framework is not compiled-in.

Also, the introduction of flags in dma_buf_fd  needs to be added to dummy
functions as well.

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
---
 include/linux/dma-buf.h |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index f08028e..779aaf9 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -189,7 +189,7 @@ static inline struct dma_buf *dma_buf_export(void *priv,
 	return ERR_PTR(-ENODEV);
 }
 
-static inline int dma_buf_fd(struct dma_buf *dmabuf)
+static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
 {
 	return -ENODEV;
 }
@@ -216,36 +216,36 @@ static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
 	return;
 }
 
-static inline int dma_buf_begin_cpu_access(struct dma_buf *,
-					   size_t, size_t,
-					   enum dma_data_direction)
+static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
+					   size_t start, size_t len,
+					   enum dma_data_direction dir)
 {
 	return -ENODEV;
 }
 
-static inline void dma_buf_end_cpu_access(struct dma_buf *,
-					  size_t, size_t,
-					  enum dma_data_direction)
+static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf,
+					  size_t start, size_t len,
+					  enum dma_data_direction dir)
 {
 }
 
-static inline void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long)
+static inline void *dma_buf_kmap_atomic(struct dma_buf *db, unsigned long pnum)
 {
 	return NULL;
 }
 
-static inline void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long,
-					 void *)
+static inline void dma_buf_kunmap_atomic(struct dma_buf *db, unsigned long pnum,
+					 void *vaddr)
 {
 }
 
-static inline void *dma_buf_kmap(struct dma_buf *, unsigned long)
+static inline void *dma_buf_kmap(struct dma_buf *db, unsigned long pnum)
 {
 	return NULL;
 }
 
-static inline void dma_buf_kunmap(struct dma_buf *, unsigned long,
-				  void *)
+static inline void dma_buf_kunmap(struct dma_buf *db, unsigned long pnum,
+				  void *vaddr)
 {
 }
 #endif /* CONFIG_DMA_SHARED_BUFFER */
-- 
1.7.5.4


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

* [PATCH] dma-buf: Correct dummy function declarations.
@ 2012-03-23 15:49 ` Sumit Semwal
  0 siblings, 0 replies; 3+ messages in thread
From: Sumit Semwal @ 2012-03-23 15:49 UTC (permalink / raw)
  To: daniel.vetter
  Cc: dri-devel, linaro-mm-sig, linux-media, Sumit Semwal, Sumit Semwal

While testing, I found that we need to correct some of the dummy declarations. When I send my pull request to Linus, I wish to squash these changes into the original patches from Daniel. Could you please review?

Best regards,
~Sumit

=========

Dummy functions for the newly added cpu access ops are needed for compilation
when dma-buf framework is not compiled-in.

Also, the introduction of flags in dma_buf_fd  needs to be added to dummy
functions as well.

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
---
 include/linux/dma-buf.h |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index f08028e..779aaf9 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -189,7 +189,7 @@ static inline struct dma_buf *dma_buf_export(void *priv,
 	return ERR_PTR(-ENODEV);
 }
 
-static inline int dma_buf_fd(struct dma_buf *dmabuf)
+static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
 {
 	return -ENODEV;
 }
@@ -216,36 +216,36 @@ static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
 	return;
 }
 
-static inline int dma_buf_begin_cpu_access(struct dma_buf *,
-					   size_t, size_t,
-					   enum dma_data_direction)
+static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
+					   size_t start, size_t len,
+					   enum dma_data_direction dir)
 {
 	return -ENODEV;
 }
 
-static inline void dma_buf_end_cpu_access(struct dma_buf *,
-					  size_t, size_t,
-					  enum dma_data_direction)
+static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf,
+					  size_t start, size_t len,
+					  enum dma_data_direction dir)
 {
 }
 
-static inline void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long)
+static inline void *dma_buf_kmap_atomic(struct dma_buf *db, unsigned long pnum)
 {
 	return NULL;
 }
 
-static inline void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long,
-					 void *)
+static inline void dma_buf_kunmap_atomic(struct dma_buf *db, unsigned long pnum,
+					 void *vaddr)
 {
 }
 
-static inline void *dma_buf_kmap(struct dma_buf *, unsigned long)
+static inline void *dma_buf_kmap(struct dma_buf *db, unsigned long pnum)
 {
 	return NULL;
 }
 
-static inline void dma_buf_kunmap(struct dma_buf *, unsigned long,
-				  void *)
+static inline void dma_buf_kunmap(struct dma_buf *db, unsigned long pnum,
+				  void *vaddr)
 {
 }
 #endif /* CONFIG_DMA_SHARED_BUFFER */
-- 
1.7.5.4

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

* Re: [PATCH] dma-buf: Correct dummy function declarations.
  2012-03-23 15:49 ` Sumit Semwal
  (?)
@ 2012-03-23 17:52 ` Daniel Vetter
  -1 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-03-23 17:52 UTC (permalink / raw)
  To: Sumit Semwal
  Cc: daniel.vetter, dri-devel, linaro-mm-sig, linux-media, Sumit Semwal

On Fri, Mar 23, 2012 at 09:19:17PM +0530, Sumit Semwal wrote:
> While testing, I found that we need to correct some of the dummy declarations. When I send my pull request to Linus, I wish to squash these changes into the original patches from Daniel. Could you please review?
> 
> Best regards,
> ~Sumit
> 
> =========
> 
> Dummy functions for the newly added cpu access ops are needed for compilation
> when dma-buf framework is not compiled-in.
> 
> Also, the introduction of flags in dma_buf_fd  needs to be added to dummy
> functions as well.
> 
> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

Sorry for fumbling the compile-testing for the !DMA_BUF case here.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Cheers, Daniel

> ---
>  include/linux/dma-buf.h |   26 +++++++++++++-------------
>  1 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> index f08028e..779aaf9 100644
> --- a/include/linux/dma-buf.h
> +++ b/include/linux/dma-buf.h
> @@ -189,7 +189,7 @@ static inline struct dma_buf *dma_buf_export(void *priv,
>  	return ERR_PTR(-ENODEV);
>  }
>  
> -static inline int dma_buf_fd(struct dma_buf *dmabuf)
> +static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
>  {
>  	return -ENODEV;
>  }
> @@ -216,36 +216,36 @@ static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
>  	return;
>  }
>  
> -static inline int dma_buf_begin_cpu_access(struct dma_buf *,
> -					   size_t, size_t,
> -					   enum dma_data_direction)
> +static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
> +					   size_t start, size_t len,
> +					   enum dma_data_direction dir)
>  {
>  	return -ENODEV;
>  }
>  
> -static inline void dma_buf_end_cpu_access(struct dma_buf *,
> -					  size_t, size_t,
> -					  enum dma_data_direction)
> +static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf,
> +					  size_t start, size_t len,
> +					  enum dma_data_direction dir)
>  {
>  }
>  
> -static inline void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long)
> +static inline void *dma_buf_kmap_atomic(struct dma_buf *db, unsigned long pnum)
>  {
>  	return NULL;
>  }
>  
> -static inline void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long,
> -					 void *)
> +static inline void dma_buf_kunmap_atomic(struct dma_buf *db, unsigned long pnum,
> +					 void *vaddr)
>  {
>  }
>  
> -static inline void *dma_buf_kmap(struct dma_buf *, unsigned long)
> +static inline void *dma_buf_kmap(struct dma_buf *db, unsigned long pnum)
>  {
>  	return NULL;
>  }
>  
> -static inline void dma_buf_kunmap(struct dma_buf *, unsigned long,
> -				  void *)
> +static inline void dma_buf_kunmap(struct dma_buf *db, unsigned long pnum,
> +				  void *vaddr)
>  {
>  }
>  #endif /* CONFIG_DMA_SHARED_BUFFER */
> -- 
> 1.7.5.4
> 

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

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

end of thread, other threads:[~2012-03-23 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 15:49 [PATCH] dma-buf: Correct dummy function declarations Sumit Semwal
2012-03-23 15:49 ` Sumit Semwal
2012-03-23 17:52 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.