Skip to content

Commit 8732565

Browse files
Tom Rixrostedt
authored andcommitted
ftrace: Set direct_ops storage-class-specifier to static
smatch reports this warning kernel/trace/ftrace.c:2594:19: warning: symbol 'direct_ops' was not declared. Should it be static? The variable direct_ops is only used in ftrace.c, so it should be static Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Signed-off-by: Tom Rix <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 08697bc commit 8732565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/ftrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,7 @@ static void call_direct_funcs(unsigned long ip, unsigned long pip,
25032503
arch_ftrace_set_direct_caller(fregs, addr);
25042504
}
25052505

2506-
struct ftrace_ops direct_ops = {
2506+
static struct ftrace_ops direct_ops = {
25072507
.func = call_direct_funcs,
25082508
.flags = FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_REGS
25092509
| FTRACE_OPS_FL_PERMANENT,

0 commit comments

Comments
 (0)