swiotlb: Make linux/swiotlb.h standalone includible
PATCH RESEND 1/1 swiotlb: Make linux/swiotlb.h standalone includible
From: Thierry Reding <[email protected]>
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.
---
Hi Konrad,
I sent this about a year ago and at the time you said you had queued it up, but it never disappeared from my local stack of patches, so here it is again.
Thierry
include/linux/swiotlb.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/swiotlb.h +3 -0
@@ -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;
Signature · 1 line
2.4.1
Quoted 14 lines · Thierry Reding
From: Thierry Reding <[email protected]>
This header file uses the enum
dma_data_directionand 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.hand forward-declare struct page. Theswiotlb_free()function is also annotated__init, therefore requireslinux/init.hto be included as well.Signed-off-by Thierry Reding <[email protected]>---
Hi Konrad,
Quoted 8 lines
I sent this about a year ago and at the time you said you had queued it up, but it never disappeared from my local stack of patches, so here it is again.
Thierry
include/linux/swiotlb.h | 3 +++ 1 file changed, 3 insertions(+)
Ping?
Quoted 22 lines
include/linux/swiotlb.h +3
-0@@ -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;Signature · 1 line
2.4.1