Skip to content

Commit

Permalink
[POWERPC] Kill sparse warnings in kprobes
Browse files Browse the repository at this point in the history
Fix sparse warnings in powerpc kprobes:

  CHECK   arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/kprobes.c:277:6: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static?
arch/powerpc/kernel/kprobes.c:287:15: warning: symbol 'trampoline_probe_handler' was not declared. Should it be static?
arch/powerpc/kernel/kprobes.c:525:16: warning: symbol 'jprobe_return_end' was not declared. Should it be static?

Fix along the same lines as http://lkml.org/lkml/2008/2/13/642

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Ananth N Mavinakayanahalli authored and Paul Mackerras committed Feb 20, 2008
1 parent 13dbf42 commit 66200ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/powerpc/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
* - When the probed function returns, this probe
* causes the handlers to fire
*/
void kretprobe_trampoline_holder(void)
static void __used kretprobe_trampoline_holder(void)
{
asm volatile(".global kretprobe_trampoline\n"
"kretprobe_trampoline:\n"
Expand All @@ -284,7 +284,8 @@ void kretprobe_trampoline_holder(void)
/*
* Called when the probe at kretprobe trampoline is hit
*/
int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
static int __kprobes trampoline_probe_handler(struct kprobe *p,
struct pt_regs *regs)
{
struct kretprobe_instance *ri = NULL;
struct hlist_head *head, empty_rp;
Expand Down Expand Up @@ -517,12 +518,12 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
return 1;
}

void __kprobes jprobe_return(void)
void __used __kprobes jprobe_return(void)
{
asm volatile("trap" ::: "memory");
}

void __kprobes jprobe_return_end(void)
static void __used __kprobes jprobe_return_end(void)
{
};

Expand Down

0 comments on commit 66200ea

Please sign in to comment.