Skip to content

Commit e8025ba

Browse files
committed
function_graph: Place ftrace_graph_entry_stub() prototype in include/linux/ftrace.h
ftrace_graph_entry_stub() is defined in generic code, its prototype should be in the generic header and not defined throughout architecture specific code in order to use it. Cc: Greentime Hu <green.hu@gmail.com> Cc: Vincent Chen <deanbo422@gmail.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent 52fde6e commit e8025ba

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/nds32/kernel/ftrace.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#ifndef CONFIG_DYNAMIC_FTRACE
88
extern void (*ftrace_trace_function)(unsigned long, unsigned long,
99
struct ftrace_ops*, struct pt_regs*);
10-
extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace);
1110
extern void ftrace_graph_caller(void);
1211

1312
noinline void __naked ftrace_stub(unsigned long ip, unsigned long parent_ip,

‎arch/parisc/kernel/ftrace.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ void notrace __hot ftrace_function_trampoline(unsigned long parent,
5151
unsigned long org_sp_gr3)
5252
{
5353
extern ftrace_func_t ftrace_trace_function; /* depends on CONFIG_DYNAMIC_FTRACE */
54-
extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace);
5554

5655
if (ftrace_trace_function != ftrace_stub) {
5756
/* struct ftrace_ops *op, struct pt_regs *regs); */

‎include/linux/ftrace.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,8 @@ struct ftrace_graph_ret {
751751
typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
752752
typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
753753

754+
extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace);
755+
754756
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
755757

756758
struct fgraph_ops {

0 commit comments

Comments
 (0)