diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2009-05-28 15:33:36 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-01 20:36:53 -0400 |
commit | 92e02a5125a22a4da58090c94f520432da700d73 (patch) | |
tree | 1d18b6c0ba08fc7dd6d8e30285ee7a650cc887df /arch/powerpc/kernel/ftrace.c | |
parent | 898b160fe9d84b7e194c9ed0495193952909c9bd (diff) |
powerpc/ftrace: Use PPC_INST_NOP directly
There's no need to wrap PPC_INST_NOP in a static inline.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/ftrace.c')
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 429e21eaaf29..1b12696cca06 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
@@ -25,11 +25,6 @@ | |||
25 | 25 | ||
26 | 26 | ||
27 | #ifdef CONFIG_DYNAMIC_FTRACE | 27 | #ifdef CONFIG_DYNAMIC_FTRACE |
28 | static unsigned int ftrace_nop_replace(void) | ||
29 | { | ||
30 | return PPC_INST_NOP; | ||
31 | } | ||
32 | |||
33 | static unsigned int | 28 | static unsigned int |
34 | ftrace_call_replace(unsigned long ip, unsigned long addr, int link) | 29 | ftrace_call_replace(unsigned long ip, unsigned long addr, int link) |
35 | { | 30 | { |
@@ -314,7 +309,7 @@ int ftrace_make_nop(struct module *mod, | |||
314 | if (test_24bit_addr(ip, addr)) { | 309 | if (test_24bit_addr(ip, addr)) { |
315 | /* within range */ | 310 | /* within range */ |
316 | old = ftrace_call_replace(ip, addr, 1); | 311 | old = ftrace_call_replace(ip, addr, 1); |
317 | new = ftrace_nop_replace(); | 312 | new = PPC_INST_NOP; |
318 | return ftrace_modify_code(ip, old, new); | 313 | return ftrace_modify_code(ip, old, new); |
319 | } | 314 | } |
320 | 315 | ||
@@ -452,7 +447,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | |||
452 | */ | 447 | */ |
453 | if (test_24bit_addr(ip, addr)) { | 448 | if (test_24bit_addr(ip, addr)) { |
454 | /* within range */ | 449 | /* within range */ |
455 | old = ftrace_nop_replace(); | 450 | old = PPC_INST_NOP; |
456 | new = ftrace_call_replace(ip, addr, 1); | 451 | new = ftrace_call_replace(ip, addr, 1); |
457 | return ftrace_modify_code(ip, old, new); | 452 | return ftrace_modify_code(ip, old, new); |
458 | } | 453 | } |