[linux-next:master 3312/3594] kernel/trace/fgraph.c:934:15: error: implicit declaration of function 'ftrace_startup_subops'; did you mean 'ftrace_startup'?

[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:   234cb065ad82915ff8d06ce01e01c3e640b674d2
commit: c132be2c4fcc1150ad0791c2a85dd4c9ad0bd0c8 [3312/3594] function_graph: Have the instances use their own ftrace_ops for filtering
config: riscv-randconfig-001-20240605 (https://download.01.org/0day-ci/archive/20240605/202406051524.a12JqLqx-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240605/202406051524.a12JqLqx-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/202406051524.a12JqLqx-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   kernel/trace/fgraph.c: In function 'register_ftrace_graph':
>> kernel/trace/fgraph.c:934:15: error: implicit declaration of function 'ftrace_startup_subops'; did you mean 'ftrace_startup'? [-Werror=implicit-function-declaration]
     934 |         ret = ftrace_startup_subops(&graph_ops, &gops->ops, command);
         |               ^~~~~~~~~~~~~~~~~~~~~
         |               ftrace_startup
   kernel/trace/fgraph.c: In function 'unregister_ftrace_graph':
>> kernel/trace/fgraph.c:973:9: error: implicit declaration of function 'ftrace_shutdown_subops'; did you mean 'ftrace_shutdown'? [-Werror=implicit-function-declaration]
     973 |         ftrace_shutdown_subops(&graph_ops, &gops->ops, command);
         |         ^~~~~~~~~~~~~~~~~~~~~~
         |         ftrace_shutdown
   cc1: some warnings being treated as errors


vim +934 kernel/trace/fgraph.c

   888	
   889	int register_ftrace_graph(struct fgraph_ops *gops)
   890	{
   891		int command = 0;
   892		int ret = 0;
   893		int i;
   894	
   895		mutex_lock(&ftrace_lock);
   896	
   897		if (!fgraph_array[0]) {
   898			/* The array must always have real data on it */
   899			for (i = 0; i < FGRAPH_ARRAY_SIZE; i++)
   900				fgraph_array[i] = &fgraph_stub;
   901		}
   902	
   903		/* Look for an available spot */
   904		for (i = 0; i < FGRAPH_ARRAY_SIZE; i++) {
   905			if (fgraph_array[i] == &fgraph_stub)
   906				break;
   907		}
   908		if (i >= FGRAPH_ARRAY_SIZE) {
   909			ret = -ENOSPC;
   910			goto out;
   911		}
   912	
   913		fgraph_array[i] = gops;
   914		if (i + 1 > fgraph_array_cnt)
   915			fgraph_array_cnt = i + 1;
   916		gops->idx = i;
   917	
   918		ftrace_graph_active++;
   919	
   920		if (ftrace_graph_active == 1) {
   921			register_pm_notifier(&ftrace_suspend_notifier);
   922			ret = start_graph_tracing();
   923			if (ret)
   924				goto error;
   925			/*
   926			 * Some archs just test to see if these are not
   927			 * the default function
   928			 */
   929			ftrace_graph_return = return_run;
   930			ftrace_graph_entry = entry_run;
   931			command = FTRACE_START_FUNC_RET;
   932		}
   933	
 > 934		ret = ftrace_startup_subops(&graph_ops, &gops->ops, command);
   935	error:
   936		if (ret) {
   937			fgraph_array[i] = &fgraph_stub;
   938			ftrace_graph_active--;
   939		}
   940	out:
   941		mutex_unlock(&ftrace_lock);
   942		return ret;
   943	}
   944	
   945	void unregister_ftrace_graph(struct fgraph_ops *gops)
   946	{
   947		int command = 0;
   948		int i;
   949	
   950		mutex_lock(&ftrace_lock);
   951	
   952		if (unlikely(!ftrace_graph_active))
   953			goto out;
   954	
   955		if (unlikely(gops->idx < 0 || gops->idx >= fgraph_array_cnt))
   956			goto out;
   957	
   958		WARN_ON_ONCE(fgraph_array[gops->idx] != gops);
   959	
   960		fgraph_array[gops->idx] = &fgraph_stub;
   961		if (gops->idx + 1 == fgraph_array_cnt) {
   962			i = gops->idx;
   963			while (i >= 0 && fgraph_array[i] == &fgraph_stub)
   964				i--;
   965			fgraph_array_cnt = i + 1;
   966		}
   967	
   968		ftrace_graph_active--;
   969	
   970		if (!ftrace_graph_active)
   971			command = FTRACE_STOP_FUNC_RET;
   972	
 > 973		ftrace_shutdown_subops(&graph_ops, &gops->ops, command);

-- 
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