MIPS: asm: Use __ASSEMBLY__ to guard some macros to avoid build error
PATCH 1/1 MIPS: asm: Use __ASSEMBLY__ to guard some macros to avoid build error
Use __ASSEMBLY__ to guard definitions of some macros (PANIC and PRINT) to avoid build error:
1, PANIC conflicts with drivers/scsi/smartpqi/smartpqi_init.c 2, PRINT conflicts with net/netfilter/nf_conntrack_h323_asn1.c and net/
mac80211/debugfs_sta.c
--- arch/mips/include/asm/asm.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/mips/include/asm/asm.h +4 -0
@@ -74,6 +74,8 @@ symbol: .insn .globl symbol; \ symbol = value +#ifdef __ASSEMBLY__ +#define PANIC (msg) \ .set push; \ .set reorder; \
@@ -98,6 +100,8 @@ symbol = value#define #endif +#endif +#define TEXT (msg) \ .pushsection .data; \ 8: .asciiz msg; \
Signature · 1 line
2.7.0
Quoted 28 lines · Huacai Chen
Use
__ASSEMBLY__to guard definitions of some macros (PANIC and PRINT) to avoid build error:1, PANIC conflicts with
drivers/scsi/smartpqi/smartpqi_init.c2, PRINT conflicts withnet/netfilter/nf_conntrack_h323_asn1.candnet/mac80211/debugfs_sta.cFixes d339cd02b888eb8c ("MIPS: Move unaligned load/store helpers to inst.h")Reported-by kbuild test robot <[email protected]>Signed-off-by Huacai Chen <[email protected]>--- arch/mips/include/asm/asm.h | 4 ++++ 1 file changed, 4 insertions(+)arch/mips/include/asm/asm.h +2
-0@@ -74,6 +74,8 @@ symbol: .insn .globl symbol; \ symbol = value +#ifdef __ASSEMBLY__ +#define PANIC (msg) \ .set push; \ .set reorder; \
arch/mips/include/asm/asm.h symbol = value · line 107
Quoted 8 lines
arch/mips/include/asm/asm.h +2
-0@@ -98,6 +100,8 @@ symbol = value#define #endif +#endif +#define TEXT (msg) \ .pushsection .data; \ 8: .asciiz msg; \
It looks like the whole file is meant for assembly code, not just the couple of conflicting definitions that were caught. At least the parts containing assembler directives are nothing to be consumed by C code.
Maybe wrap the whole file and see if it correctly builds?
Hi, Xuerui,
Quoted 44 lines · WANG Xuerui
Quoted 28 lines · Huacai Chen
Use
__ASSEMBLY__to guard definitions of some macros (PANIC and PRINT) to avoid build error:1, PANIC conflicts with
drivers/scsi/smartpqi/smartpqi_init.c2, PRINT conflicts withnet/netfilter/nf_conntrack_h323_asn1.candnet/mac80211/debugfs_sta.cFixes d339cd02b888eb8c ("MIPS: Move unaligned load/store helpers to inst.h")Reported-by kbuild test robot <[email protected]>Signed-off-by Huacai Chen <[email protected]>--- arch/mips/include/asm/asm.h | 4 ++++ 1 file changed, 4 insertions(+)arch/mips/include/asm/asm.h +2
-0@@ -74,6 +74,8 @@ symbol: .insn .globl symbol; \ symbol = value +#ifdef __ASSEMBLY__ +#define PANIC (msg) \ .set push; \ .set reorder; \arch/mips/include/asm/asm.h symbol = value · line 107
Quoted 8 lines
arch/mips/include/asm/asm.h +2
-0@@ -98,6 +100,8 @@ symbol = value#define #endif +#endif +#define TEXT (msg) \ .pushsection .data; \ 8: .asciiz msg; \It looks like the whole file is meant for assembly code, not just the couple of conflicting definitions that were caught. At least the parts containing assembler directives are nothing to be consumed by C code.
Quoted 1 line
Maybe wrap the whole file and see if it correctly builds?
I have tried to wrap the whole file, but it causes a ton of other build errors.
Regards,
Huacai
Thomas Bogendoerfer
maintainerQuoted 6 lines · Huacai Chen
Use
__ASSEMBLY__to guard definitions of some macros (PANIC and PRINT) to avoid build error:1, PANIC conflicts with
drivers/scsi/smartpqi/smartpqi_init.c2, PRINT conflicts withnet/netfilter/nf_conntrack_h323_asn1.candnet/
mac80211/debugfs_sta.c
how about prefixing them to make them more unique ? Something like MIPS_ASM_PRINT/MIPS_ASM_PANIC ?
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
Hi, Thomas,
Quoted 11 lines · Thomas Bogendoerfer
Quoted 6 lines · Huacai Chen
Use
__ASSEMBLY__to guard definitions of some macros (PANIC and PRINT) to avoid build error:1, PANIC conflicts with
drivers/scsi/smartpqi/smartpqi_init.c2, PRINT conflicts withnet/netfilter/nf_conntrack_h323_asn1.candnet/
mac80211/debugfs_sta.chow about prefixing them to make them more unique ? Something like MIPS_ASM_PRINT/MIPS_ASM_PANIC ?
Thanks for your review, and I will send a new patch by renaming them.
Regards,
Huacai
Quoted 6 lines
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]