From: kernel test robot <lkp@intel.com>
To: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 4360/4582] kernel/trace/fgraph.c:1175:28: warning: unused variable 'op'
Date: Fri, 7 Jun 2024 18:47:55 +0800 [thread overview]
Message-ID: <202406071806.BRjaC5FF-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d35b2284e966c0bef3e2182a5c5ea02177dd32e4
commit: 4057fd2cddaea0d6f6c5f8af4a455741f5632259 [4360/4582] function_graph: Do not update pid func if CONFIG_DYNAMIC_FTRACE not enabled
config: csky-randconfig-001-20240607 (https://download.01.org/0day-ci/archive/20240607/202406071806.BRjaC5FF-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240607/202406071806.BRjaC5FF-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406071806.BRjaC5FF-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/trace/fgraph.c: In function 'fgraph_update_pid_func':
>> kernel/trace/fgraph.c:1175:28: warning: unused variable 'op' [-Wunused-variable]
1175 | struct ftrace_ops *op;
| ^~
>> kernel/trace/fgraph.c:1174:28: warning: unused variable 'gops' [-Wunused-variable]
1174 | struct fgraph_ops *gops;
| ^~~~
kernel/trace/fgraph.c: At top level:
>> kernel/trace/fgraph.c:1154:12: warning: 'fgraph_pid_func' defined but not used [-Wunused-function]
1154 | static int fgraph_pid_func(struct ftrace_graph_ent *trace,
| ^~~~~~~~~~~~~~~
vim +/op +1175 kernel/trace/fgraph.c
e73e679f656e67 Steven Rostedt (VMware 2018-11-15 1153)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 @1154) static int fgraph_pid_func(struct ftrace_graph_ent *trace,
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1155) struct fgraph_ops *gops)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1156) {
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1157) struct trace_array *tr = gops->ops.private;
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1158) int pid;
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1159)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1160) if (tr) {
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1161) pid = this_cpu_read(tr->array_buffer.data->ftrace_ignore_pid);
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1162) if (pid == FTRACE_PID_IGNORE)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1163) return 0;
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1164) if (pid != FTRACE_PID_TRACE &&
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1165) pid != current->pid)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1166) return 0;
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1167) }
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1168)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1169) return gops->saved_func(trace, gops);
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1170) }
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1171)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1172) void fgraph_update_pid_func(void)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1173) {
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 @1174) struct fgraph_ops *gops;
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 @1175) struct ftrace_ops *op;
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1176)
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1177) if (!(graph_ops.flags & FTRACE_OPS_FL_INITIALIZED))
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1178) return;
df3ec5da6a1e7f Steven Rostedt (Google 2024-06-03 1179)
:::::: The code at line 1175 was first introduced by commit
:::::: df3ec5da6a1e7f6e142680d7c5266d3af187170b function_graph: Add pid tracing back to function graph tracer
:::::: TO: Steven Rostedt (Google) <rostedt@goodmis.org>
:::::: CC: Steven Rostedt (Google) <rostedt@goodmis.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-06-07 10:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202406071806.BRjaC5FF-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox