diff options
author | Vincent Chen <vincent.chen@sifive.com> | 2020-06-23 07:37:35 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-07-10 05:12:28 +0200 |
commit | 70ee5731a40b1f07f151e52c3c4ed27d70d4f9fe (patch) | |
tree | 459ae8550b02dbc4ec558ff479863ee5829fa5d1 /arch/riscv/include/asm/kgdb.h | |
parent | kgdb: Move the extern declaration kgdb_has_hit_break() to generic kgdb.h (diff) | |
download | linux-70ee5731a40b1f07f151e52c3c4ed27d70d4f9fe.tar.xz linux-70ee5731a40b1f07f151e52c3c4ed27d70d4f9fe.zip |
riscv: Avoid kgdb.h including gdb_xml.h to solve unused-const-variable warning
The constant arrays in gdb_xml.h are only used in arch/riscv/kernel/kgdb.c,
but other c files may include the gdb_xml.h indirectly via including the
kgdb.h. Hence, It will cause many unused-const-variable warnings. This
patch makes the kgdb.h not to include the gdb_xml.h to solve this problem.
Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to '')
-rw-r--r-- | arch/riscv/include/asm/kgdb.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/kgdb.h b/arch/riscv/include/asm/kgdb.h index f45889bbb965..46677daf708b 100644 --- a/arch/riscv/include/asm/kgdb.h +++ b/arch/riscv/include/asm/kgdb.h @@ -105,7 +105,9 @@ static inline void arch_kgdb_breakpoint(void) #define DBG_REG_BADADDR_OFF 34 #define DBG_REG_CAUSE_OFF 35 -#include <asm/gdb_xml.h> +extern const char riscv_gdb_stub_feature[64]; + +#define kgdb_arch_gdb_stub_feature riscv_gdb_stub_feature #endif #endif |