* [PATCH 25/34] sparc64: fix sparse warnings in kprobes.c
@ 2014-05-03 22:52 Sam Ravnborg
2014-05-16 21:26 ` Sam Ravnborg
0 siblings, 1 reply; 2+ messages in thread
From: Sam Ravnborg @ 2014-05-03 22:52 UTC (permalink / raw)
To: sparclinux
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.
One is magically used without any real reference so mark is __used, like other arch do too.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
arch/sparc/kernel/kprobes.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index 1b09735..98d7128 100644
--- a/arch/sparc/kernel/kprobes.c
+++ b/arch/sparc/kernel/kprobes.c
@@ -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"
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 25/34] sparc64: fix sparse warnings in kprobes.c
2014-05-03 22:52 [PATCH 25/34] sparc64: fix sparse warnings in kprobes.c Sam Ravnborg
@ 2014-05-16 21:26 ` Sam Ravnborg
0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2014-05-16 21:26 UTC (permalink / raw)
To: sparclinux
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: Sam Ravnborg <sam@ravnborg.org>
---
arch/sparc/kernel/kprobes.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index 1b09735..98d7128 100644
--- a/arch/sparc/kernel/kprobes.c
+++ b/arch/sparc/kernel/kprobes.c
@@ -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"
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-16 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 22:52 [PATCH 25/34] sparc64: fix sparse warnings in kprobes.c Sam Ravnborg
2014-05-16 21:26 ` Sam Ravnborg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.