[PATCH] powerpc/asm: Allow including ppc_asm.h in asm files

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3555d

2 messages, 2 authors, 2016-11-14 · open the first message on its own page

[PATCH] powerpc/asm: Allow including ppc_asm.h in asm files

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-11-04 02:39:47

There's no reason to #error if we include ppc_asm.h in asm files, the
ifdef already prevents any problems.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/include/asm/ppc_asm.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index c73750b0d9fa..28ab87e5b739 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -10,9 +10,7 @@
 #include <asm/ppc-opcode.h>
 #include <asm/firmware.h>
 
-#ifndef __ASSEMBLY__
-#error __FILE__ should only be used in assembler files
-#else
+#ifdef __ASSEMBLY__
 
 #define SZL			(BITS_PER_LONG/8)
 
@@ -779,5 +777,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
 	.long 0xa6037b7d; /* mtsrr1 r11				*/ \
 	.long 0x2400004c  /* rfid				*/
 #endif /* !CONFIG_PPC_BOOK3E */
+
 #endif /*  __ASSEMBLY__ */
+
 #endif /* _ASM_POWERPC_PPC_ASM_H */
-- 
2.7.4

Re: powerpc/asm: Allow including ppc_asm.h in asm files

From: Michael Ellerman <hidden>
Date: 2016-11-14 12:17:14

On Fri, 2016-04-11 at 02:39:43 UTC, Michael Ellerman wrote:
There's no reason to #error if we include ppc_asm.h in asm files, the
ifdef already prevents any problems.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.

https://git.kernel.org/powerpc/c/e3f2c6c39371c0e67c7fd6ebcb8b74

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help