Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f827ea7 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller
Browse files

sparc64: fix sparse warnings in kprobes.c



Fix following warnings:
kprobes.c:515:15: warning: symbol 'trampoline_probe_handler' was not declared. Should it be static?
kprobes.c:579:6: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static?

Declare the functions static.
kretprobe_trampoline_holder is magically used without any real
reference so mark is __used, like other arch's do too.

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8c7260c0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -512,7 +512,8 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
/*
 * 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;
@@ -576,7 +577,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
	return 1;
}

void kretprobe_trampoline_holder(void)
static void __used kretprobe_trampoline_holder(void)
{
	asm volatile(".global kretprobe_trampoline\n"
		     "kretprobe_trampoline:\n"