Skip to contentSkip to conversation

kprobes/x86: remove extern from function definition

PATCH In review Emil Goode 2 participants 2 messages Mar 3, 2012 – Mar 5, 2012

Subsystems (2)
lore
Share & tools
lore

Emil Goode

author
#0 lore raw

PATCH 1/1 kprobes/x86: remove extern from function definition

Functions with definition should not be declared extern.

sparse warns:
arch/x86/kernel/kprobes.c:1489:13: warning:
function 'arch_unoptimize_kprobes' with external linkage has definition

---
 arch/x86/kernel/kprobes.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes.c +2 -2
index 7da647d..f55c28e 100644
@@ -1486,8 +1486,8 @@ static void __kprobes setup_unoptimize_kprobe(struct text_poke_param *tprm,
  * 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;
 	int c = 0;
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Emil Goode

Functions with definition should not be declared extern.

sparse warns:
arch/x86/kernel/kprobes.c:1489:13: warning:
function 'arch_unoptimize_kprobes' with external linkage has definition

Thank you!

Quoted 19 lines
---
 arch/x86/kernel/kprobes.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes.c +2 -2
index 7da647d..f55c28e 100644
@@ -1486,8 +1486,8 @@ static void __kprobes setup_unoptimize_kprobe(struct text_poke_param *tprm,
  * 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;
 	int c = 0;
Signature · 4 lines
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: [email protected]