Skip to contentSkip to conversation

scatterlist.h needs types.h

PATCH In review Jean Delvare 2 participants 3 messages Mar 1, 2007 – Mar 2, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scatterlist.h needs types.h

Most architectures' scatterlist.h use the type dma_addr_t, but omit to include <asm/types.h> which defines it. This could lead to build failures, so let's add the missing includes.

---
 include/asm-alpha/scatterlist.h     |    1 +
 include/asm-avr32/scatterlist.h     |    2 ++
 include/asm-frv/scatterlist.h       |    2 ++
 include/asm-h8300/scatterlist.h     |    2 ++
 include/asm-i386/scatterlist.h      |    2 ++
 include/asm-ia64/scatterlist.h      |    2 ++
 include/asm-m32r/scatterlist.h      |    2 ++
 include/asm-m68knommu/scatterlist.h |    1 +
 include/asm-mips/scatterlist.h      |    2 ++
 include/asm-parisc/scatterlist.h    |    1 +
 include/asm-sh/scatterlist.h        |    2 ++
 include/asm-sh64/scatterlist.h      |    2 ++
 include/asm-sparc64/scatterlist.h   |    1 +
 include/asm-v850/scatterlist.h      |    2 ++
 include/asm-x86_64/scatterlist.h    |    2 ++
 include/asm-xtensa/scatterlist.h    |    2 ++
 16 files changed, 28 insertions(+)
include/asm-x86_64/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef _X8664_SCATTERLIST_H
 #define _X8664_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
     struct page		*page;
     unsigned int	offset;
include/asm-alpha/scatterlist.h +1 -0
@@ -2,6 +2,7 @@
 #define _ALPHA_SCATTERLIST_H
 
 #include <asm/page.h>
+#include <asm/types.h>
   
 struct scatterlist {
 	struct page *page;
include/asm-avr32/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef __ASM_AVR32_SCATTERLIST_H
 #define __ASM_AVR32_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
     struct page		*page;
     unsigned int	offset;
include/asm-frv/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef _ASM_SCATTERLIST_H
 #define _ASM_SCATTERLIST_H
 
+#include <asm/types.h>
+
 /*
  * Drivers must set either ->address or (preferred) ->page and ->offset
  * to indicate where data must be transferred to/from.
include/asm-h8300/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef _H8300_SCATTERLIST_H
 #define _H8300_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
 	struct page	*page;
 	unsigned int	offset;
include/asm-i386/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef _I386_SCATTERLIST_H
 #define _I386_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
     struct page		*page;
     unsigned int	offset;
include/asm-ia64/scatterlist.h +2 -0
@@ -6,6 +6,8 @@
  *	David Mosberger-Tang <[email protected]>, Hewlett-Packard Co
  */
 
+#include <asm/types.h>
+
 struct scatterlist {
 	struct page *page;
 	unsigned int offset;
include/asm-m32r/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SCATTERLIST_H
 #define _ASM_M32R_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
     char *  address;    /* Location data is to be transferred to, NULL for
                          * highmem page */
include/asm-m68knommu/scatterlist.h +1 -0
@@ -2,6 +2,7 @@
 #define _M68KNOMMU_SCATTERLIST_H
 
 #include <linux/mm.h>
+#include <asm/types.h>
 
 struct scatterlist {
 	struct page	*page;
include/asm-mips/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef __ASM_SCATTERLIST_H
 #define __ASM_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
 	struct page *	page;
 	unsigned int	offset;
include/asm-parisc/scatterlist.h +1 -0
@@ -2,6 +2,7 @@
 #define _ASM_PARISC_SCATTERLIST_H
 
 #include <asm/page.h>
+#include <asm/types.h>
 
 struct scatterlist {
 	struct page *page;
include/asm-sh/scatterlist.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef __ASM_SH_SCATTERLIST_H
 #define __ASM_SH_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
     struct page * page; /* Location for highmem page, if any */
     unsigned int offset;/* for highmem, page offset */
include/asm-sh64/scatterlist.h +2 -0
@@ -11,6 +11,8 @@
 #ifndef __ASM_SH64_SCATTERLIST_H
 #define __ASM_SH64_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
     struct page * page; /* Location for highmem page, if any */
     unsigned int offset;/* for highmem, page offset */
include/asm-sparc64/scatterlist.h +1 -0
@@ -3,6 +3,7 @@
 #define _SPARC64_SCATTERLIST_H
 
 #include <asm/page.h>
+#include <asm/types.h>
 
 struct scatterlist {
 	struct page	*page;
include/asm-v850/scatterlist.h +2 -0
@@ -14,6 +14,8 @@
 #ifndef __V850_SCATTERLIST_H__
 #define __V850_SCATTERLIST_H__
 
+#include <asm/types.h>
+
 struct scatterlist {
 	struct page	*page;
 	unsigned	offset;
include/asm-xtensa/scatterlist.h +2 -0
@@ -11,6 +11,8 @@
 #ifndef _XTENSA_SCATTERLIST_H
 #define _XTENSA_SCATTERLIST_H
 
+#include <asm/types.h>
+
 struct scatterlist {
 	struct page 	*page;
 	unsigned int	offset;
Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 3 lines · On Thu, 1 Mar 2007 13:55:16 +0100 Jean Delvare <[email protected]> wrote:

Most architectures' scatterlist.h use the type dma_addr_t, but omit to include <asm/types.h> which defines it. This could lead to build failures, so let's add the missing includes.

_does_ it actually lead to build errors? If so, 2.6.21. If not, 2.6.22.

#2 lore raw

Hi Andrew,

Quoted 8 lines · Andrew Morton
Quoted 3 lines · On Thu, 1 Mar 2007 13:55:16 +0100 Jean Delvare <[email protected]> wrote:

Most architectures' scatterlist.h use the type dma_addr_t, but omit to include <asm/types.h> which defines it. This could lead to build failures, so let's add the missing includes.

_does_ it actually lead to build errors? If so, 2.6.21. If not, 2.6.22.

No known build error at the moment, so 2.6.22 is fine with me.

I'm working on a patch cleaning up the inclusion of <linux/pci.h> across the whole kernel, and this is how I've hit the problem. I'll post that patch later today for comments.

Thanks,

Signature · 1 line
Jean Delvare