Skip to contentSkip to conversation

mips asm/types.h: add #ifndef to fix compile error

PATCH In review [email protected] 2 participants 2 messages Dec 30, 2013 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips asm/types.h: add #ifndef to fix compile error

From: Du Huanpeng <[email protected]>

without "#ifndef __ASSEMBLY__ #endif", an assembly file including this file will break compilation.

---
 arch/mips/include/asm/types.h |    4 ++++
 1 file changed, 4 insertions(+)
arch/mips/include/asm/types.h +4 -0
index f5373cc..0341e8b 100644
@@ -13,6 +13,8 @@
 
 #include <asm-generic/int-ll64.h>
 
+#ifndef __ASSEMBLY__
+
 #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
     || defined(CONFIG_64BIT)
 typedef u64 dma_addr_t;
@@ -21,6 +23,8 @@ typedef u32 dma_addr_t;
 #endif
 typedef u64 dma64_addr_t;
 
+#endif
+
 /*
  * We don't use int-l64.h for the kernel anymore but still use it for
  * userspace to avoid code changes.
Signature · 7 lines
1.7.9.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 24 lines · On Mon, 30 Dec 2013 16:29:53 +0800 [email protected] wrote:

From: Du Huanpeng <[email protected]>

without "#ifndef __ASSEMBLY__ #endif", an assembly file including this file will break compilation.

---
 arch/mips/include/asm/types.h |    4 ++++
 1 file changed, 4 insertions(+)
arch/mips/include/asm/types.h +2 -0
index f5373cc..0341e8b 100644
@@ -13,6 +13,8 @@
 
 #include <asm-generic/int-ll64.h>
 
+#ifndef __ASSEMBLY__
+
 #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
     || defined(CONFIG_64BIT)
 typedef u64 dma_addr_t;

arch/mips/include/asm/types.h typedef u32 dma_addr_t; · line 26

Quoted 4 lines
arch/mips/include/asm/types.h +1 -0
@@ -21,6 +23,8 @@ typedef u32 dma_addr_t;
 #endif
 typedef u64 dma64_addr_t;
 
+#endif

Please change this '#endif' to '#endif /* __ASSEMBLY__ */'

Quoted 12 lines
arch/mips/include/asm/types.h +1 -0
+
 /*
  * We don't use int-l64.h for the kernel anymore but still use it for
  * userspace to avoid code changes.
Signature · 7 lines
1.7.9.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 8 lines
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox