Commit 5281ec8
tracing: hide unused ftrace_event_id_fops
When CONFIG_PERF_EVENTS, a 'make W=1' build produces a warning about the
unused ftrace_event_id_fops variable:
kernel/trace/trace_events.c:2155:37: error: 'ftrace_event_id_fops' defined but not used [-Werror=unused-const-variable=]
2155 | static const struct file_operations ftrace_event_id_fops = {
Hide this in the same #ifdef as the reference to it.
Link: https://lore.kernel.org/linux-trace-kernel/20240403080702.3509288-7-arnd@kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Zheng Yejian <zhengyejian1@huawei.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ajay Kaher <akaher@vmware.com>
Cc: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: Clément Léger <cleger@rivosinc.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Fixes: 620a30e ("tracing: Don't pass file_operations array to event_create_dir()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent d96c360 commit 5281ec8
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1670 | 1670 | | |
1671 | 1671 | | |
1672 | 1672 | | |
| 1673 | + | |
1673 | 1674 | | |
1674 | 1675 | | |
1675 | 1676 | | |
| |||
1684 | 1685 | | |
1685 | 1686 | | |
1686 | 1687 | | |
| 1688 | + | |
1687 | 1689 | | |
1688 | 1690 | | |
1689 | 1691 | | |
| |||
2152 | 2154 | | |
2153 | 2155 | | |
2154 | 2156 | | |
| 2157 | + | |
2155 | 2158 | | |
2156 | 2159 | | |
2157 | 2160 | | |
2158 | 2161 | | |
| 2162 | + | |
2159 | 2163 | | |
2160 | 2164 | | |
2161 | 2165 | | |
| |||
0 commit comments