public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)'
Date: Tue, 28 Sep 2021 09:43:14 +0800	[thread overview]
Message-ID: <202109280909.aPlO2bOQ-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6724 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: d19ad0775dcd64b49eecf4fa79c17959ebfbd26b ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs
date:   11 months ago
config: nds32-buildonly-randconfig-r002-20210927 (attached as .config)
compiler: nds32le-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/torvalds/linux.git/commit/?id=d19ad0775dcd64b49eecf4fa79c17959ebfbd26b
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d19ad0775dcd64b49eecf4fa79c17959ebfbd26b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>):

   kernel/trace/ftrace.c: In function 'ftrace_ops_get_list_func':
>> kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
     128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
         |                               ^
   kernel/trace/ftrace.c:174:24: note: in expansion of macro 'ftrace_ops_list_func'
     174 |                 return ftrace_ops_list_func;
         |                        ^~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c: In function 'update_ftrace_function':
>> kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
     128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
         |                               ^
   kernel/trace/ftrace.c:207:24: note: in expansion of macro 'ftrace_ops_list_func'
     207 |                 func = ftrace_ops_list_func;
         |                        ^~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
     128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
         |                               ^
   kernel/trace/ftrace.c:220:21: note: in expansion of macro 'ftrace_ops_list_func'
     220 |         if (func == ftrace_ops_list_func) {
         |                     ^~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c: At top level:
   kernel/trace/ftrace.c:302:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
     302 | int __register_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:345:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
     345 | int __unregister_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:584:5: warning: no previous prototype for 'ftrace_profile_pages_init' [-Wmissing-prototypes]
     584 | int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c: In function 'ftrace_modify_all_code':
>> kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
     128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
         |                               ^
   kernel/trace/ftrace.c:2672:49: note: in expansion of macro 'ftrace_ops_list_func'
    2672 |                 err = ftrace_update_ftrace_func(ftrace_ops_list_func);
         |                                                 ^~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
     128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
         |                               ^
   kernel/trace/ftrace.c:2682:48: note: in expansion of macro 'ftrace_ops_list_func'
    2682 |         if (update && ftrace_trace_function != ftrace_ops_list_func) {
         |                                                ^~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c: At top level:
   kernel/trace/ftrace.c:3856:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
    3856 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
         |               ^~~~~~~~~~~~~~~~~~~~~~~~


vim +128 kernel/trace/ftrace.c

16444a8a40d4c7 Arnaldo Carvalho de Melo 2008-05-12  121  
2f5f6ad9390c1e Steven Rostedt           2011-08-08  122  #if ARCH_SUPPORTS_FTRACE_OPS
2f5f6ad9390c1e Steven Rostedt           2011-08-08  123  static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
d19ad0775dcd64 Steven Rostedt (VMware   2020-10-28  124) 				 struct ftrace_ops *op, struct ftrace_regs *fregs);
2f5f6ad9390c1e Steven Rostedt           2011-08-08  125  #else
2f5f6ad9390c1e Steven Rostedt           2011-08-08  126  /* See comment below, where ftrace_ops_list_func is defined */
2f5f6ad9390c1e Steven Rostedt           2011-08-08  127  static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip);
2f5f6ad9390c1e Steven Rostedt           2011-08-08 @128  #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
2f5f6ad9390c1e Steven Rostedt           2011-08-08  129  #endif
b848914ce39589 Steven Rostedt           2011-05-04  130  

:::::: The code at line 128 was first introduced by commit
:::::: 2f5f6ad9390c1ebbf738d130dbfe80b60eaa167e ftrace: Pass ftrace_ops as third parameter to function trace callback

:::::: TO: Steven Rostedt <srostedt@redhat.com>
:::::: CC: Steven Rostedt <rostedt@goodmis.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28016 bytes --]

                 reply	other threads:[~2021-09-28  1:44 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=202109280909.aPlO2bOQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --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