llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [jsarha:topic/chromeos-4.19-s0ix 9206/9999] kernel/gcov/clang.c:221:9: error: implicit declaration of function 'within_module'
@ 2022-04-21  6:41 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-21  6:41 UTC (permalink / raw)
  Cc: kbuild-all, llvm

BCC: lkp@intel.com
CC: linux-kernel@vger.kernel.org
TO: Greg Hackmann <ghackmann@android.com>
CC: Nick Desaulniers <ndesaulniers@google.com>
CC: Tri Vo <trong@android.com>
CC: Peter Oberparleiter <oberpar@linux.ibm.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Yu Zhao <yuzhao@google.com>
CC: Sean Paul <seanpaul@chromium.org>

Hi Greg,

FYI, the error/warning still remains.

tree:   https://github.com/jsarha/linux topic/chromeos-4.19-s0ix
head:   430bdaa0a8c38697780f45a148964d71951df11f
commit: 35be48648a6552869bd5d6c9a0d278102d23d46c [9206/9999] UPSTREAM: gcov: clang support
config: mips-randconfig-r035-20220420 (https://download.01.org/0day-ci/archive/20220421/202204210248.PacAcknN-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/jsarha/linux/commit/35be48648a6552869bd5d6c9a0d278102d23d46c
        git remote add jsarha https://github.com/jsarha/linux
        git fetch --no-tags jsarha topic/chromeos-4.19-s0ix
        git checkout 35be48648a6552869bd5d6c9a0d278102d23d46c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash M=kernel/gcov

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/gcov/clang.c:85:6: warning: no previous prototype for function 'llvm_gcov_init' [-Wmissing-prototypes]
   void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
        ^
   kernel/gcov/clang.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
   ^
   static 
   kernel/gcov/clang.c:108:6: warning: no previous prototype for function 'llvm_gcda_start_file' [-Wmissing-prototypes]
   void llvm_gcda_start_file(const char *orig_filename, const char version[4],
        ^
   kernel/gcov/clang.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void llvm_gcda_start_file(const char *orig_filename, const char version[4],
   ^
   static 
   kernel/gcov/clang.c:117:6: warning: no previous prototype for function 'llvm_gcda_emit_function' [-Wmissing-prototypes]
   void llvm_gcda_emit_function(u32 ident, const char *function_name,
        ^
   kernel/gcov/clang.c:117:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void llvm_gcda_emit_function(u32 ident, const char *function_name,
   ^
   static 
   kernel/gcov/clang.c:137:6: warning: no previous prototype for function 'llvm_gcda_emit_arcs' [-Wmissing-prototypes]
   void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
        ^
   kernel/gcov/clang.c:137:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
   ^
   static 
   kernel/gcov/clang.c:147:6: warning: no previous prototype for function 'llvm_gcda_summary_info' [-Wmissing-prototypes]
   void llvm_gcda_summary_info(void)
        ^
   kernel/gcov/clang.c:147:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void llvm_gcda_summary_info(void)
   ^
   static 
   kernel/gcov/clang.c:152:6: warning: no previous prototype for function 'llvm_gcda_end_file' [-Wmissing-prototypes]
   void llvm_gcda_end_file(void)
        ^
   kernel/gcov/clang.c:152:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void llvm_gcda_end_file(void)
   ^
   static 
>> kernel/gcov/clang.c:221:9: error: implicit declaration of function 'within_module' [-Werror,-Wimplicit-function-declaration]
           return within_module((unsigned long)info->filename, mod);
                  ^
   kernel/gcov/clang.c:221:9: note: did you mean 'init_module'?
   include/linux/module.h:75:12: note: 'init_module' declared here
   extern int init_module(void);
              ^
   6 warnings and 1 error generated.


vim +/within_module +221 kernel/gcov/clang.c

   211	
   212	/**
   213	 * gcov_info_within_module - check if a profiling data set belongs to a module
   214	 * @info: profiling data set
   215	 * @mod: module
   216	 *
   217	 * Returns true if profiling data belongs module, false otherwise.
   218	 */
   219	bool gcov_info_within_module(struct gcov_info *info, struct module *mod)
   220	{
 > 221		return within_module((unsigned long)info->filename, mod);
   222	}
   223	

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

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

* [jsarha:topic/chromeos-4.19-s0ix 9206/9999] kernel/gcov/clang.c:221:9: error: implicit declaration of function 'within_module'
@ 2024-01-22 19:05 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-01-22 19:05 UTC (permalink / raw)
  Cc: oe-kbuild-all, llvm


tree:   https://github.com/jsarha/linux topic/chromeos-4.19-s0ix
head:   430bdaa0a8c38697780f45a148964d71951df11f
commit: 35be48648a6552869bd5d6c9a0d278102d23d46c [9206/9999] UPSTREAM: gcov: clang support
config: x86_64-buildonly-randconfig-004-20240122 (https://download.01.org/0day-ci/archive/20240123/202401230353.Rzf6chZz-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240123/202401230353.Rzf6chZz-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401230353.Rzf6chZz-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/gcov/clang.c:85:6: warning: no previous prototype for function 'llvm_gcov_init' [-Wmissing-prototypes]
      85 | void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
         |      ^
   kernel/gcov/clang.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      85 | void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
         | ^
         | static 
   kernel/gcov/clang.c:108:6: warning: no previous prototype for function 'llvm_gcda_start_file' [-Wmissing-prototypes]
     108 | void llvm_gcda_start_file(const char *orig_filename, const char version[4],
         |      ^
   kernel/gcov/clang.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     108 | void llvm_gcda_start_file(const char *orig_filename, const char version[4],
         | ^
         | static 
   kernel/gcov/clang.c:117:6: warning: no previous prototype for function 'llvm_gcda_emit_function' [-Wmissing-prototypes]
     117 | void llvm_gcda_emit_function(u32 ident, const char *function_name,
         |      ^
   kernel/gcov/clang.c:117:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     117 | void llvm_gcda_emit_function(u32 ident, const char *function_name,
         | ^
         | static 
   kernel/gcov/clang.c:137:6: warning: no previous prototype for function 'llvm_gcda_emit_arcs' [-Wmissing-prototypes]
     137 | void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
         |      ^
   kernel/gcov/clang.c:137:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     137 | void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
         | ^
         | static 
   kernel/gcov/clang.c:147:6: warning: no previous prototype for function 'llvm_gcda_summary_info' [-Wmissing-prototypes]
     147 | void llvm_gcda_summary_info(void)
         |      ^
   kernel/gcov/clang.c:147:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     147 | void llvm_gcda_summary_info(void)
         | ^
         | static 
   kernel/gcov/clang.c:152:6: warning: no previous prototype for function 'llvm_gcda_end_file' [-Wmissing-prototypes]
     152 | void llvm_gcda_end_file(void)
         |      ^
   kernel/gcov/clang.c:152:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     152 | void llvm_gcda_end_file(void)
         | ^
         | static 
>> kernel/gcov/clang.c:221:9: error: implicit declaration of function 'within_module' [-Werror,-Wimplicit-function-declaration]
     221 |         return within_module((unsigned long)info->filename, mod);
         |                ^
   kernel/gcov/clang.c:221:9: note: did you mean 'init_module'?
   include/linux/module.h:75:12: note: 'init_module' declared here
      75 | extern int init_module(void);
         |            ^
   6 warnings and 1 error generated.


vim +/within_module +221 kernel/gcov/clang.c

   211	
   212	/**
   213	 * gcov_info_within_module - check if a profiling data set belongs to a module
   214	 * @info: profiling data set
   215	 * @mod: module
   216	 *
   217	 * Returns true if profiling data belongs module, false otherwise.
   218	 */
   219	bool gcov_info_within_module(struct gcov_info *info, struct module *mod)
   220	{
 > 221		return within_module((unsigned long)info->filename, mod);
   222	}
   223	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2024-01-22 19:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-22 19:05 [jsarha:topic/chromeos-4.19-s0ix 9206/9999] kernel/gcov/clang.c:221:9: error: implicit declaration of function 'within_module' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-04-21  6:41 kernel test robot

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