[linux-next:master 4360/4582] kernel/trace/fgraph.c:1175:28: warning: unused variable 'op'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406071806.BRjaC5FF-lkp@xxxxxxxxx/

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@xxxxxxxxxxx>
:::::: CC: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux