Skip to content

Commit def0aa2

Browse files
VincentZWCpalmer-dabbelt
authored andcommitted
kgdb: Move the extern declaration kgdb_has_hit_break() to generic kgdb.h
Currently, only riscv kgdb.c uses the kgdb_has_hit_break() to identify the kgdb breakpoint. It causes other architectures will encounter the "no previous prototype" warnings if the compile option has W=1. Moving the declaration of extern kgdb_has_hit_break() from risc-v kgdb.h to generic kgdb.h to avoid generating these warnings. Signed-off-by: Vincent Chen <[email protected]> Acked-by: Daniel Thompson <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f7fc752 commit def0aa2

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

arch/riscv/include/asm/kgdb.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#ifndef __ASSEMBLY__
2121

22-
extern int kgdb_has_hit_break(unsigned long addr);
2322
extern unsigned long kgdb_compiled_break;
2423

2524
static inline void arch_kgdb_breakpoint(void)

include/linux/kgdb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ extern int kgdb_hex2mem(char *buf, char *mem, int count);
325325

326326
extern int kgdb_isremovedbreak(unsigned long addr);
327327
extern void kgdb_schedule_breakpoint(void);
328+
extern int kgdb_has_hit_break(unsigned long addr);
328329

329330
extern int
330331
kgdb_handle_exception(int ex_vector, int signo, int err_code,

0 commit comments

Comments
 (0)