aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-02-14 18:23:53 -0500
committerIngo Molnar <mingo@elte.hu>2008-02-19 10:18:28 -0500
commitf1452d424dc0e079fb97af8cb8d3a0f7b5fddd46 (patch)
tree65ab910d2deff5622bdb8a6ad1a2d4430bfd965c /arch/x86
parent08cd93f9e11ac8c3e42c72debe7dc55a761149c2 (diff)
x86, kprobes: remove sparse warnings from x86
arch/x86/kernel/kprobes.c:584:16: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static? arch/x86/kernel/kprobes.c:676:6: warning: symbol 'trampoline_handler' was not declared. Should it be static? Make them static and add the __used attribute, approach taken from the arm kprobes implementation. kretprobe_trampoline_holder uses inline assemly to define the global symbol kretprobe_trampoline, but nothing ever calls the holder explicitly. trampoline handler is only called from inline assembly in the same file, mark it used and static. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/kprobes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
index a99e764fd66a..34a591283f5d 100644
--- a/arch/x86/kernel/kprobes.c
+++ b/arch/x86/kernel/kprobes.c
@@ -581,7 +581,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
581 * When a retprobed function returns, this code saves registers and 581 * When a retprobed function returns, this code saves registers and
582 * calls trampoline_handler() runs, which calls the kretprobe's handler. 582 * calls trampoline_handler() runs, which calls the kretprobe's handler.
583 */ 583 */
584void __kprobes kretprobe_trampoline_holder(void) 584static void __used __kprobes kretprobe_trampoline_holder(void)
585{ 585{
586 asm volatile ( 586 asm volatile (
587 ".global kretprobe_trampoline\n" 587 ".global kretprobe_trampoline\n"
@@ -673,7 +673,7 @@ void __kprobes kretprobe_trampoline_holder(void)
673/* 673/*
674 * Called from kretprobe_trampoline 674 * Called from kretprobe_trampoline
675 */ 675 */
676void * __kprobes trampoline_handler(struct pt_regs *regs) 676static __used __kprobes void *trampoline_handler(struct pt_regs *regs)
677{ 677{
678 struct kretprobe_instance *ri = NULL; 678 struct kretprobe_instance *ri = NULL;
679 struct hlist_head *head, empty_rp; 679 struct hlist_head *head, empty_rp;