mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [jolsa-perf:bpf/batch 7/27] include/linux/ftrace.h:361:5: warning: no previous prototype for function 'modify_ftrace_direct_multi'
Date: Fri, 27 Aug 2021 14:25:33 +0800	[thread overview]
Message-ID: <202108271426.yxFUyYmn-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch
head:   b81b17307e02f8e6d4abf87e7ec2d7e5aea1e0b5
commit: 81a7fb1d152a20b3bdb300bb584c69d620e3c811 [7/27] ftrace: Add multi direct modify interface
config: riscv-buildonly-randconfig-r006-20210826 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1076082a0d97bd5c16a25ee7cf3dbb6ee4b5a9fe)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=81a7fb1d152a20b3bdb300bb584c69d620e3c811
        git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
        git fetch --no-tags jolsa-perf bpf/batch
        git checkout 81a7fb1d152a20b3bdb300bb584c69d620e3c811
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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

   In file included from drivers/gpu/drm/exynos/exynos_drm_drv.c:16:
   In file included from include/drm/drm_atomic.h:31:
   In file included from include/drm/drm_crtc.h:31:
   In file included from include/linux/fb.h:5:
   In file included from include/linux/kgdb.h:19:
   In file included from include/linux/kprobes.h:29:
   include/linux/ftrace.h:353:41: warning: declaration of 'struct ftrace_ops' will not be visible outside of this function [-Wvisibility]
   int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
                                           ^
   include/linux/ftrace.h:353:5: warning: no previous prototype for function 'register_ftrace_direct_multi' [-Wmissing-prototypes]
   int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
       ^
   include/linux/ftrace.h:353:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
   ^
   static 
   include/linux/ftrace.h:357:43: warning: declaration of 'struct ftrace_ops' will not be visible outside of this function [-Wvisibility]
   int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
                                             ^
   include/linux/ftrace.h:357:5: warning: no previous prototype for function 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
   int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
       ^
   include/linux/ftrace.h:357:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
   ^
   static 
   include/linux/ftrace.h:361:39: warning: declaration of 'struct ftrace_ops' will not be visible outside of this function [-Wvisibility]
   int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
                                         ^
>> include/linux/ftrace.h:361:5: warning: no previous prototype for function 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
   int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
       ^
   include/linux/ftrace.h:361:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
   ^
   static 
   6 warnings generated.


vim +/modify_ftrace_direct_multi +361 include/linux/ftrace.h

   322	
   323	#else
   324	# define ftrace_direct_func_count 0
   325	static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
   326	{
   327		return -ENOTSUPP;
   328	}
   329	static inline int unregister_ftrace_direct(unsigned long ip, unsigned long addr)
   330	{
   331		return -ENOTSUPP;
   332	}
   333	static inline int modify_ftrace_direct(unsigned long ip,
   334					       unsigned long old_addr, unsigned long new_addr)
   335	{
   336		return -ENOTSUPP;
   337	}
   338	static inline struct ftrace_direct_func *ftrace_find_direct_func(unsigned long addr)
   339	{
   340		return NULL;
   341	}
   342	static inline int ftrace_modify_direct_caller(struct ftrace_func_entry *entry,
   343						      struct dyn_ftrace *rec,
   344						      unsigned long old_addr,
   345						      unsigned long new_addr)
   346	{
   347		return -ENODEV;
   348	}
   349	static inline unsigned long ftrace_find_rec_direct(unsigned long ip)
   350	{
   351		return 0;
   352	}
   353	int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
   354	{
   355		return -ENODEV;
   356	}
   357	int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
   358	{
   359		return -ENODEV;
   360	}
 > 361	int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
   362	{
   363		return -ENODEV;
   364	}
   365	#endif /* CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS */
   366	

---
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: 35762 bytes --]

                 reply	other threads:[~2021-08-27  6:26 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=202108271426.yxFUyYmn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jolsa@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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®