RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros

INT and SHORT are used by some drivers that pull in the include files,
so prefixing helps avoid namespace conflicts. Other constructs in the
same file already uses this.

Fixes, among others, these warnings with allmodconfig:

../sound/core/pcm_misc.c:43:0: warning: "INT" redefined
 #define INT __force int

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Olof Johansson 2017-11-29 17:55:13 -08:00 committed by Palmer Dabbelt
parent 5ddf755e44
commit 5e6f82b0fe
2 changed files with 9 additions and 9 deletions

View File

@ -58,17 +58,17 @@
#endif #endif
#if (__SIZEOF_INT__ == 4) #if (__SIZEOF_INT__ == 4)
#define INT __ASM_STR(.word) #define RISCV_INT __ASM_STR(.word)
#define SZINT __ASM_STR(4) #define RISCV_SZINT __ASM_STR(4)
#define LGINT __ASM_STR(2) #define RISCV_LGINT __ASM_STR(2)
#else #else
#error "Unexpected __SIZEOF_INT__" #error "Unexpected __SIZEOF_INT__"
#endif #endif
#if (__SIZEOF_SHORT__ == 2) #if (__SIZEOF_SHORT__ == 2)
#define SHORT __ASM_STR(.half) #define RISCV_SHORT __ASM_STR(.half)
#define SZSHORT __ASM_STR(2) #define RISCV_SZSHORT __ASM_STR(2)
#define LGSHORT __ASM_STR(1) #define RISCV_LGSHORT __ASM_STR(1)
#else #else
#error "Unexpected __SIZEOF_SHORT__" #error "Unexpected __SIZEOF_SHORT__"
#endif #endif

View File

@ -27,8 +27,8 @@
typedef u32 bug_insn_t; typedef u32 bug_insn_t;
#ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS #ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
#define __BUG_ENTRY_ADDR INT " 1b - 2b" #define __BUG_ENTRY_ADDR RISCV_INT " 1b - 2b"
#define __BUG_ENTRY_FILE INT " %0 - 2b" #define __BUG_ENTRY_FILE RISCV_INT " %0 - 2b"
#else #else
#define __BUG_ENTRY_ADDR RISCV_PTR " 1b" #define __BUG_ENTRY_ADDR RISCV_PTR " 1b"
#define __BUG_ENTRY_FILE RISCV_PTR " %0" #define __BUG_ENTRY_FILE RISCV_PTR " %0"
@ -38,7 +38,7 @@ typedef u32 bug_insn_t;
#define __BUG_ENTRY \ #define __BUG_ENTRY \
__BUG_ENTRY_ADDR "\n\t" \ __BUG_ENTRY_ADDR "\n\t" \
__BUG_ENTRY_FILE "\n\t" \ __BUG_ENTRY_FILE "\n\t" \
SHORT " %1" RISCV_SHORT " %1"
#else #else
#define __BUG_ENTRY \ #define __BUG_ENTRY \
__BUG_ENTRY_ADDR __BUG_ENTRY_ADDR