diff mbox series

[2/8] MIPS: regdefs.h: Guard all defines with __ASSEMBLY__

Message ID 20240209-regname-v1-2-2125efa016ef@flygoat.com (mailing list archive)
State Accepted
Commit 88ca06ec04fab6cdceed5321c74a812ccc2aa519
Headers show
Series MIPS: Unify register numbering macros for uasm | expand

Commit Message

Jiaxun Yang Feb. 9, 2024, 6:07 p.m. UTC
Those definitions are only meant to be used in pure assembly code.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/include/asm/regdef.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/arch/mips/include/asm/regdef.h b/arch/mips/include/asm/regdef.h
index 3c687df1d515..87ba7be1a847 100644
--- a/arch/mips/include/asm/regdef.h
+++ b/arch/mips/include/asm/regdef.h
@@ -14,6 +14,7 @@ 
 
 #include <asm/sgidefs.h>
 
+#ifdef __ASSEMBLY__
 #if _MIPS_SIM == _MIPS_SIM_ABI32
 
 /*
@@ -102,5 +103,6 @@ 
 #define ra	$31	/* return address */
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
+#endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_REGDEF_H */