* [2.6 patch] x86 kprobes_64.c: make 3 functions static
@ 2007-11-09 6:03 Adrian Bunk
2007-11-09 15:06 ` Arjan van de Ven
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2007-11-09 6:03 UTC (permalink / raw)
To: prasanna, ananth, anil.s.keshavamurthy, davem, tglx, mingo, hpa
Cc: linux-kernel
This patch makes the following needlessly global functions static:
- kprobe_handler()
- trampoline_probe_handler()
- post_kprobe_handler()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
arch/x86/kernel/kprobes_64.c | 7 ++++---
include/asm-x86/kprobes_64.h | 2 --
2 files changed, 4 insertions(+), 5 deletions(-)
dec0510a1f75dce9dbdb75458fd870fba14bd7b4
diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c
index 3db3611..7abfc8a 100644
--- a/arch/x86/kernel/kprobes_64.c
+++ b/arch/x86/kernel/kprobes_64.c
@@ -278,7 +278,7 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
*sara = (unsigned long) &kretprobe_trampoline;
}
-int __kprobes kprobe_handler(struct pt_regs *regs)
+static int __kprobes kprobe_handler(struct pt_regs *regs)
{
struct kprobe *p;
int ret = 0;
@@ -395,7 +395,8 @@ no_kprobe:
/*
* Called when we hit the probe point at kretprobe_trampoline
*/
-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;
@@ -536,7 +537,7 @@ static void __kprobes resume_execution(struct kprobe *p,
}
}
-int __kprobes post_kprobe_handler(struct pt_regs *regs)
+static int __kprobes post_kprobe_handler(struct pt_regs *regs)
{
struct kprobe *cur = kprobe_running();
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
diff --git a/include/asm-x86/kprobes_64.h b/include/asm-x86/kprobes_64.h
index 53f4d85..497dad1 100644
--- a/include/asm-x86/kprobes_64.h
+++ b/include/asm-x86/kprobes_64.h
@@ -81,9 +81,7 @@ static inline void restore_interrupts(struct pt_regs *regs)
local_irq_enable();
}
-extern int post_kprobe_handler(struct pt_regs *regs);
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
-extern int kprobe_handler(struct pt_regs *regs);
extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [2.6 patch] x86 kprobes_64.c: make 3 functions static
2007-11-09 6:03 [2.6 patch] x86 kprobes_64.c: make 3 functions static Adrian Bunk
@ 2007-11-09 15:06 ` Arjan van de Ven
2007-11-09 15:21 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Arjan van de Ven @ 2007-11-09 15:06 UTC (permalink / raw)
To: Adrian Bunk
Cc: prasanna, ananth, anil.s.keshavamurthy, davem, tglx, mingo, hpa,
linux-kernel
On Fri, 9 Nov 2007 07:03:26 +0100
Adrian Bunk <bunk@kernel.org> wrote:
> This patch makes the following needlessly global functions static:
> - kprobe_handler()
> - trampoline_probe_handler()
> - post_kprobe_handler()
>
while I appreciate your cleanups, I would like to ask you to be a bit
careful with the x86/ ones; some of these are for now deliberate to
make unification between the 32 and 64 ones possible.. eg we're working
on getting the more cosmetic (and in this context, removing a static is
more or less cosmetic) changes away so that "diff" shows us the *real*
differences between the 32 and 64 bit versions... adding back in the
static is the opposite direction ;)
So.. if you find ones that are real for both 32 and 64 bit, by all
means, but otherwise be a bit careful..
Greetings,
Arjan van de Ven
--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] x86 kprobes_64.c: make 3 functions static
2007-11-09 15:06 ` Arjan van de Ven
@ 2007-11-09 15:21 ` Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2007-11-09 15:21 UTC (permalink / raw)
To: Arjan van de Ven
Cc: prasanna, ananth, anil.s.keshavamurthy, davem, tglx, mingo, hpa,
linux-kernel
On Fri, Nov 09, 2007 at 07:06:09AM -0800, Arjan van de Ven wrote:
> On Fri, 9 Nov 2007 07:03:26 +0100
> Adrian Bunk <bunk@kernel.org> wrote:
>
> > This patch makes the following needlessly global functions static:
> > - kprobe_handler()
> > - trampoline_probe_handler()
> > - post_kprobe_handler()
> >
>
>
> while I appreciate your cleanups, I would like to ask you to be a bit
> careful with the x86/ ones; some of these are for now deliberate to
> make unification between the 32 and 64 ones possible.. eg we're working
> on getting the more cosmetic (and in this context, removing a static is
> more or less cosmetic) changes away so that "diff" shows us the *real*
> differences between the 32 and 64 bit versions... adding back in the
> static is the opposite direction ;)
>
> So.. if you find ones that are real for both 32 and 64 bit, by all
> means, but otherwise be a bit careful..
I tried to ensure that my cleanup patches do not make the 32 and 64 bit
versions more different.
And e.g. in this case the kprobe_handler() and post_kprobe_handler()
statifications remove the cosmetic difference of the 64bit ones not
being static. ;-)
Anyway, if any or all of my patches conflict with any other work simply
ignore them and I'll resend them after 2.6.25-rc1 (if they still both
apply and make sense).
> Greetings,
> Arjan van de Ven
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-09 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-09 6:03 [2.6 patch] x86 kprobes_64.c: make 3 functions static Adrian Bunk
2007-11-09 15:06 ` Arjan van de Ven
2007-11-09 15:21 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox