linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mcgrof:sysctl-testing 21/24] kernel/trace/ftrace.c:7884:9: error: 'saved_ftrace_func' undeclared
@ 2022-04-16  4:30 kernel test robot
  2022-04-21 18:43 ` Luis Chamberlain
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-04-16  4:30 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-testing
head:   f219482651c5469dd3a6fab22c7be9fb763c26ef
commit: ae3e836e7177c547d2ae3f51d20208462e623c57 [21/24] ftrace: fix building with SYSCTL=n but DYNAMIC_FTRACE=y
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20220416/202204161203.6dSlgKJX-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?id=ae3e836e7177c547d2ae3f51d20208462e623c57
        git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
        git fetch --no-tags mcgrof sysctl-testing
        git checkout ae3e836e7177c547d2ae3f51d20208462e623c57
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/trace/ftrace.c: In function 'ftrace_startup_sysctl':
>> kernel/trace/ftrace.c:7884:9: error: 'saved_ftrace_func' undeclared (first use in this function)
    7884 |         saved_ftrace_func = NULL;
         |         ^~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:7884:9: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/trace/ftrace.c:7886:13: error: 'ftrace_start_up' undeclared (first use in this function); did you mean 'ftrace_startup'?
    7886 |         if (ftrace_start_up) {
         |             ^~~~~~~~~~~~~~~
         |             ftrace_startup
>> kernel/trace/ftrace.c:7887:27: error: 'FTRACE_UPDATE_CALLS' undeclared (first use in this function)
    7887 |                 command = FTRACE_UPDATE_CALLS;
         |                           ^~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:7889:36: error: 'FTRACE_START_FUNC_RET' undeclared (first use in this function)
    7889 |                         command |= FTRACE_START_FUNC_RET;
         |                                    ^~~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:7890:17: error: implicit declaration of function 'ftrace_startup_enable'; did you mean 'ftrace_startup_all'? [-Werror=implicit-function-declaration]
    7890 |                 ftrace_startup_enable(command);
         |                 ^~~~~~~~~~~~~~~~~~~~~
         |                 ftrace_startup_all
   kernel/trace/ftrace.c: In function 'ftrace_shutdown_sysctl':
   kernel/trace/ftrace.c:7902:13: error: 'ftrace_start_up' undeclared (first use in this function); did you mean 'ftrace_startup'?
    7902 |         if (ftrace_start_up) {
         |             ^~~~~~~~~~~~~~~
         |             ftrace_startup
>> kernel/trace/ftrace.c:7903:27: error: 'FTRACE_DISABLE_CALLS' undeclared (first use in this function)
    7903 |                 command = FTRACE_DISABLE_CALLS;
         |                           ^~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:7905:36: error: 'FTRACE_STOP_FUNC_RET' undeclared (first use in this function)
    7905 |                         command |= FTRACE_STOP_FUNC_RET;
         |                                    ^~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:7906:17: error: implicit declaration of function 'ftrace_run_update_code' [-Werror=implicit-function-declaration]
    7906 |                 ftrace_run_update_code(command);
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/saved_ftrace_func +7884 kernel/trace/ftrace.c

  7874	
  7875	#ifdef CONFIG_SYSCTL
  7876	static void ftrace_startup_sysctl(void)
  7877	{
  7878		int command;
  7879	
  7880		if (unlikely(ftrace_disabled))
  7881			return;
  7882	
  7883		/* Force update next time */
> 7884		saved_ftrace_func = NULL;
  7885		/* ftrace_start_up is true if we want ftrace running */
> 7886		if (ftrace_start_up) {
> 7887			command = FTRACE_UPDATE_CALLS;
  7888			if (ftrace_graph_active)
> 7889				command |= FTRACE_START_FUNC_RET;
> 7890			ftrace_startup_enable(command);
  7891		}
  7892	}
  7893	
  7894	static void ftrace_shutdown_sysctl(void)
  7895	{
  7896		int command;
  7897	
  7898		if (unlikely(ftrace_disabled))
  7899			return;
  7900	
  7901		/* ftrace_start_up is true if ftrace is running */
> 7902		if (ftrace_start_up) {
> 7903			command = FTRACE_DISABLE_CALLS;
  7904			if (ftrace_graph_active)
> 7905				command |= FTRACE_STOP_FUNC_RET;
> 7906			ftrace_run_update_code(command);
  7907		}
  7908	}
  7909	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [mcgrof:sysctl-testing 21/24] kernel/trace/ftrace.c:7884:9: error: 'saved_ftrace_func' undeclared
  2022-04-16  4:30 [mcgrof:sysctl-testing 21/24] kernel/trace/ftrace.c:7884:9: error: 'saved_ftrace_func' undeclared kernel test robot
@ 2022-04-21 18:43 ` Luis Chamberlain
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Chamberlain @ 2022-04-21 18:43 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel

On Sat, Apr 16, 2022 at 12:30:45PM +0800, kernel test robot wrote:

OK I've fixed thist thanks.

  Luis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-21 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16  4:30 [mcgrof:sysctl-testing 21/24] kernel/trace/ftrace.c:7884:9: error: 'saved_ftrace_func' undeclared kernel test robot
2022-04-21 18:43 ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).