All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] swiotlb: Make linux/swiotlb.h standalone includable
@ 2014-08-05 12:58 Thierry Reding
  2014-08-05 15:22 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2014-08-05 12:58 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: linux-kernel

From: Thierry Reding <treding@nvidia.com>

This header file uses the enum dma_data_direction and struct page types
without explicitly including the corresponding header files. This makes
it rely on the includer to have included the proper headers before.

To fix this, include linux/dma-direction.h and forward-declare struct
page. The swiotlb_free() function is also annotated __init, therefore
requires linux/init.h to be included as well.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Alternatively rather than include linux/init.h for swiotlb_free() it
should be possible to simply remove the annotation in the header since
the implementation already has it and that's where it matters.

 include/linux/swiotlb.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
index e7a018eaf3a2..017fced60242 100644
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
@@ -1,10 +1,13 @@
 #ifndef __LINUX_SWIOTLB_H
 #define __LINUX_SWIOTLB_H
 
+#include <linux/dma-direction.h>
+#include <linux/init.h>
 #include <linux/types.h>
 
 struct device;
 struct dma_attrs;
+struct page;
 struct scatterlist;
 
 extern int swiotlb_force;
-- 
2.0.4


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

* Re: [PATCH] swiotlb: Make linux/swiotlb.h standalone includable
  2014-08-05 12:58 [PATCH] swiotlb: Make linux/swiotlb.h standalone includable Thierry Reding
@ 2014-08-05 15:22 ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 2+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-08-05 15:22 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-kernel

On Tue, Aug 05, 2014 at 02:58:51PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> This header file uses the enum dma_data_direction and struct page types
> without explicitly including the corresponding header files. This makes
> it rely on the includer to have included the proper headers before.
> 
> To fix this, include linux/dma-direction.h and forward-declare struct
> page. The swiotlb_free() function is also annotated __init, therefore
> requires linux/init.h to be included as well.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Alternatively rather than include linux/init.h for swiotlb_free() it
> should be possible to simply remove the annotation in the header since
> the implementation already has it and that's where it matters.

This is fine. Will queue it up for 3.17. Thanks!
> 
>  include/linux/swiotlb.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
> index e7a018eaf3a2..017fced60242 100644
> --- a/include/linux/swiotlb.h
> +++ b/include/linux/swiotlb.h
> @@ -1,10 +1,13 @@
>  #ifndef __LINUX_SWIOTLB_H
>  #define __LINUX_SWIOTLB_H
>  
> +#include <linux/dma-direction.h>
> +#include <linux/init.h>
>  #include <linux/types.h>
>  
>  struct device;
>  struct dma_attrs;
> +struct page;
>  struct scatterlist;
>  
>  extern int swiotlb_force;
> -- 
> 2.0.4
> 

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

end of thread, other threads:[~2014-08-05 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 12:58 [PATCH] swiotlb: Make linux/swiotlb.h standalone includable Thierry Reding
2014-08-05 15:22 ` Konrad Rzeszutek Wilk

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.