Skip to contentSkip to conversation

x86/kprobes: Remove the unneeded extern keyword

PATCH New Qiheng Lin 1 participant 1 message Jun 1, 2021 x86

lore
Share & tools
lore

Qiheng Lin

author
#0 lore raw

PATCH v2 1/1 x86/kprobes: Remove the unneeded extern keyword

The function declaration in kprobes.h is already marked extern, so remove it in the definition.

This problem was caught by the sparse tool:
function 'arch_unoptimize_kprobes' with external linkage has definition

---
Changes in v2:
- adjust the subject and commit message

 arch/x86/kernel/kprobes/opt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes/opt.c +2 -2
index 71425ebba98a..7d962c884505 100644
@@ -539,8 +539,8 @@ void arch_unoptimize_kprobe(struct optimized_kprobe *op)
  * Recover original instructions and breakpoints from relative jumps.
  * Caller must call with locking kprobe_mutex.
  */
-extern void arch_unoptimize_kprobes(struct list_head *oplist,
-				    struct list_head *done_list)
+void arch_unoptimize_kprobes(struct list_head *oplist,
+			     struct list_head *done_list)
 {
 	struct optimized_kprobe *op, *tmp;
 
Signature · 1 line
2.31.1