Commit 5e6f82b0 authored by Olof Johansson's avatar Olof Johansson Committed by Palmer Dabbelt

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: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 5ddf755e
...@@ -58,17 +58,17 @@ ...@@ -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
......
...@@ -27,8 +27,8 @@ ...@@ -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; ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment