summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2023-03-11 14:51:13 +0100
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-03-19 17:20:49 +0100
commit8732565549011cabbea08329a1aefd78a68d96c7 (patch)
tree1a490b63e5a3494f7a1fbca84409bd3bcdc5e62f /kernel/trace
parenttrace/hwlat: Do not start per-cpu thread if it is already running (diff)
downloadlinux-8732565549011cabbea08329a1aefd78a68d96c7.tar.xz
linux-8732565549011cabbea08329a1aefd78a68d96c7.zip
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/20230311135113.711824-1-trix@redhat.com Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ftrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index a47f7d93e32d..ec2897a76004 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2503,7 +2503,7 @@ static void call_direct_funcs(unsigned long ip, unsigned long pip,
arch_ftrace_set_direct_caller(fregs, addr);
}
-struct ftrace_ops direct_ops = {
+static struct ftrace_ops direct_ops = {
.func = call_direct_funcs,
.flags = FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_REGS
| FTRACE_OPS_FL_PERMANENT,