Skip to contentSkip to conversation

arch/x86/kernel/kprobes.c: quiet sprase noise about external linkage

PATCH In review H Hartley Sweeten 2 participants 2 messages Sep 9, 2011 – Sep 10, 2011 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86/kernel/kprobes.c: quiet sprase noise about external linkage

The function arch_unoptimize_kprobes is already declared extern in <linux/kprobes.h>. The actual function should not be marked as extern. This quiets the following sparse noise:

warning: function 'arch_unoptimize_kprobes' with external linkage has definition

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Jiri Olsa <[email protected]>

---

arch/x86/kernel/kprobes.c +2 -2
index f1a6244..e8d5903 100644
@@ -1483,8 +1483,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;
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · H Hartley Sweeten

The function arch_unoptimize_kprobes is already declared extern in <linux/kprobes.h>. The actual function should not be marked as extern. This quiets the following sparse noise:

warning: function 'arch_unoptimize_kprobes' with external linkage has definition

Right, there is no reason to mark it extern.

Thank you,

Quoted 31 lines
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Jiri Olsa <[email protected]>

---

arch/x86/kernel/kprobes.c +2 -3
index f1a6244..e8d5903 100644
@@ -1483,8 +1483,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;
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 4 lines
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: [email protected]