mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: kbuild-all@lists.01.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [gustavoars:for-next/cast-function 3/4] kernel/trace/ftrace.c:7029:6: error: conflicting types for 'arch_ftrace_ops_list_func'
Date: Fri, 15 Oct 2021 12:06:47 +0800	[thread overview]
Message-ID: <202110151233.4prSVXyX-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/cast-function
head:   21078041965eb5a2e83d296690a93243611a3c27
commit: c45ede6c27819bb038af313b475fdf50ce755dd6 [3/4] ftrace: Fix -Wmissing-prototypes errors
config: i386-randconfig-r001-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=c45ede6c27819bb038af313b475fdf50ce755dd6
        git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
        git fetch --no-tags gustavoars for-next/cast-function
        git checkout c45ede6c27819bb038af313b475fdf50ce755dd6
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 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 >>):

   In file included from kernel/trace/ftrace.c:29:
   include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
         |                                         ^~~~~~~~~~~
   kernel/trace/ftrace.c:297:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
     297 | int __register_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:340:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
     340 | int __unregister_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:579:5: warning: no previous prototype for 'ftrace_profile_pages_init' [-Wmissing-prototypes]
     579 | int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:3871:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
    3871 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
         |               ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:7029:6: error: conflicting types for 'arch_ftrace_ops_list_func'
    7029 | void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from kernel/trace/ftrace.c:29:
   include/linux/ftrace.h:48:6: note: previous declaration of 'arch_ftrace_ops_list_func' was here
      48 | void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/arch_ftrace_ops_list_func +7029 kernel/trace/ftrace.c

b848914ce39589 Steven Rostedt          2011-05-04  7011  
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7012  /*
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7013   * Some archs only support passing ip and parent_ip. Even though
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7014   * the list function ignores the op parameter, we do not want any
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7015   * C side effects, where a function is called without the caller
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7016   * sending a third parameter.
a1e2e31d175a13 Steven Rostedt          2011-08-09  7017   * Archs are to support both the regs and ftrace_ops at the same time.
a1e2e31d175a13 Steven Rostedt          2011-08-09  7018   * If they support ftrace_ops, it is assumed they support regs.
a1e2e31d175a13 Steven Rostedt          2011-08-09  7019   * If call backs want to use regs, they must either check for regs
06aeaaeabf69da Masami Hiramatsu        2012-09-28  7020   * being NULL, or CONFIG_DYNAMIC_FTRACE_WITH_REGS.
06aeaaeabf69da Masami Hiramatsu        2012-09-28  7021   * Note, CONFIG_DYNAMIC_FTRACE_WITH_REGS expects a full regs to be saved.
a1e2e31d175a13 Steven Rostedt          2011-08-09  7022   * An architecture can pass partial regs with ftrace_ops and still
b8ec330a63eb39 Li Bin                  2015-11-30  7023   * set the ARCH_SUPPORTS_FTRACE_OPS.
1bdc308cabc872 Gustavo A. R. Silva     2021-10-13  7024   *
1bdc308cabc872 Gustavo A. R. Silva     2021-10-13  7025   * In vmlinux.lds.h, ftrace_ops_list_func() is defined to be
1bdc308cabc872 Gustavo A. R. Silva     2021-10-13  7026   * arch_ftrace_ops_list_func.
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7027   */
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7028  #if ARCH_SUPPORTS_FTRACE_OPS
1bdc308cabc872 Gustavo A. R. Silva     2021-10-13 @7029  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
d19ad0775dcd64 Steven Rostedt (VMware  2020-10-28  7030) 			       struct ftrace_ops *op, struct ftrace_regs *fregs)
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7031  {
d19ad0775dcd64 Steven Rostedt (VMware  2020-10-28  7032) 	__ftrace_ops_list_func(ip, parent_ip, NULL, fregs);
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7033  }
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7034  #else
1bdc308cabc872 Gustavo A. R. Silva     2021-10-13  7035  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip)
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7036  {
a1e2e31d175a13 Steven Rostedt          2011-08-09  7037  	__ftrace_ops_list_func(ip, parent_ip, NULL, NULL);
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7038  }
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7039  #endif
1bdc308cabc872 Gustavo A. R. Silva     2021-10-13  7040  NOKPROBE_SYMBOL(arch_ftrace_ops_list_func);
2f5f6ad9390c1e Steven Rostedt          2011-08-08  7041  

:::::: The code at line 7029 was first introduced by commit
:::::: 1bdc308cabc872d3f6998ba8af9b1e3bc88cea64 ftrace: Fix -Wcast-function-type warnings on powerpc64

:::::: TO: Gustavo A. R. Silva <gustavoars@kernel.org>
:::::: CC: Gustavo A. R. Silva <gustavoars@kernel.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: 42199 bytes --]

                 reply	other threads:[~2021-10-15  4:07 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=202110151233.4prSVXyX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®