Missing ifndef __ASSEMBLY__ in include/asm-powerpc/dcr.h
PATCH 1/1 Missing ifndef __ASSEMBLY__ in include/asm-powerpc/dcr.h
Missing ifndef __ASSEMBLY__ in include/asm-powerpc/dcr.h
A missing structure forward declaration causes a lot of warnings when compiling for a powerpc 405. Because this header is used for assembly too, the declaration must be put within #ifndef __ASSEMBLY__, as should be the function prototypes.
This patch applies on 2.6.20.
include/asm-powerpc/dcr.h +3 -0
@@ -33,10 +33,13 @@* base from the device-tree */ #ifdef CONFIG_PPC_MERGE +#ifndef __ASSEMBLY__ +struct device_node ;extern unsigned int dcr_resource_start (struct device_node *np,unsigned int index);extern unsigned int dcr_resource_len (struct device_node *np,unsigned int index); +#endif #endif /* CONFIG_PPC_MERGE */
=20
#endif /* CONFIG_PPC_DCR */
--=20
Mathieu Desnoyers
Computer Engineering Graduate Student, =C9cole Polytechnique de Montr=E9al OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Quoted 10 lines · Mathieu Desnoyers
Missing ifndef
__ASSEMBLY__ininclude/asm-powerpc/dcr.hA missing structure forward declaration causes a lot of warnings when compiling for a powerpc 405. Because this header is used for assembly too, the declaration must be put within #ifndef
__ASSEMBLY__, as should be the function prototypes.This patch applies on 2.6.20.
Signed-off-by Mathieu Desnoyers <[email protected]>
Out of curiosity, are you working on 405 support for arch/powerpc ?
Ben.
Quoted 16 lines
include/asm-powerpc/dcr.h +3
-0@@ -33,10 +33,13 @@* base from the device-tree */ #ifdef CONFIG_PPC_MERGE +#ifndef __ASSEMBLY__ +struct device_node ;extern unsigned int dcr_resource_start (struct device_node *np,unsigned int index);extern unsigned int dcr_resource_len (struct device_node *np,unsigned int index); +#endif #endif /* CONFIG_PPC_MERGE */ #endif /* CONFIG_PPC_DCR */
Quoted 11 lines · * Benjamin Herrenschmidt ([email protected]) wrote:
Quoted 10 lines · Mathieu Desnoyers
Missing ifndef
__ASSEMBLY__ininclude/asm-powerpc/dcr.h
=20
A missing structure forward declaration causes a lot of warnings when compiling for a powerpc 405. Because this header is used for assembly too, the declaration must be put within #ifndef__ASSEMBLY__, as should be the function prototypes.
=20
This patch applies on 2.6.20.
=20Signed-off-by Mathieu Desnoyers <[email protected]>
Quoted 5 lines
=20
Out of curiosity, are you working on 405 support forarch/powerpc? =20
Ben.
=20
I am just trying to compile for my LTTng tracer regression tests. I guess I'm better off using arch/pcc instead.
Quoted 9 lines
Quoted 9 lines
include/asm-powerpc/dcr.h +2
-0@@ -33,10 +33,13 @@* base from the device-tree */ #ifdef CONFIG_PPC_MERGE +#ifndef __ASSEMBLY__ +struct device_node ; extern unsigned int dcr_resource_start(struct device_node *np,
Quoted 8 lines
Quoted 7 lines
include/asm-powerpc/dcr.h +1
-0unsigned int index);extern unsigned int dcr_resource_len (struct device_node *np,unsigned int index); +#endif #endif /* CONFIG_PPC_MERGE */ =20
#endif /*CONFIG_PPC_DCR*/=20
--=20
Mathieu Desnoyers
Computer Engineering Graduate Student, =C9cole Polytechnique de Montr=E9al OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Quoted 8 lines · Mathieu Desnoyers
Missing ifndef
__ASSEMBLY__ininclude/asm-powerpc/dcr.hA missing structure forward declaration causes a lot of warnings when compiling for a powerpc 405. Because this header is used for assembly too, the declaration must be put within #ifndef
__ASSEMBLY__, as should be the function prototypes.This patch applies on 2.6.20.
This is the wrong fix. The arch/powerpc version of dcr.h, unlike the arch/ppc version, should never be included in assembler.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson