[jsarha:topic/chromeos-4.19-s0ix 9206/9999] kernel/gcov/gcc_4_7.c:162:16: error: implicit declaration of function 'within_module'; did you mean 'init_module'?

From: kernel test robot
Date: Mon Apr 11 2022 - 13:53:44 EST


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: openrisc-randconfig-s032-20220411 (https://download.01.org/0day-ci/archive/20220412/202204120122.ULP2Vs6G-lkp@xxxxxxxxx/config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# 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 to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc SHELL=/bin/bash M=kernel/gcov

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

All errors (new ones prefixed by >>):

kernel/gcov/gcc_4_7.c: In function 'gcov_info_within_module':
>> kernel/gcov/gcc_4_7.c:162:16: error: implicit declaration of function 'within_module'; did you mean 'init_module'? [-Werror=implicit-function-declaration]
162 | return within_module((unsigned long)info, mod);
| ^~~~~~~~~~~~~
| init_module
cc1: some warnings being treated as errors


vim +162 kernel/gcov/gcc_4_7.c

152
153 /**
154 * gcov_info_within_module - check if a profiling data set belongs to a module
155 * @info: profiling data set
156 * @mod: module
157 *
158 * Returns true if profiling data belongs module, false otherwise.
159 */
160 bool gcov_info_within_module(struct gcov_info *info, struct module *mod)
161 {
> 162 return within_module((unsigned long)info, mod);
163 }
164

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