Content-Type: multipart/mixed; boundary="===============3748950466343925745==" MIME-Version: 1.0 From: Leizhen (ThunderTown) To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 8/8] kallsyms: Add self-test facility Date: Tue, 20 Sep 2022 14:13:29 +0800 Message-ID: <6c02ff59-99f9-5a4b-9bf2-ab0ea12de2c8@huawei.com> In-Reply-To: <202209201123.hihIfjo1-lkp@intel.com> List-Id: --===============3748950466343925745== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 2022/9/20 11:14, kernel test robot wrote: > Hi Zhen, > = > Thank you for the patch! Perhaps something to improve: > = > [auto build test WARNING on mcgrof/modules-next] > [also build test WARNING on linus/master v6.0-rc6 next-20220919] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > = > url: https://github.com/intel-lab-lkp/linux/commits/Zhen-Lei/kallsyms-= Optimizes-the-performance-of-lookup-symbols/20220919-231916 > base: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git = modules-next > config: i386-randconfig-a001-20220919 (https://download.01.org/0day-ci/ar= chive/20220920/202209201123.hihIfjo1-lkp(a)intel.com/config) > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c= 006a5895fc0e329fe15fead81e37457cb1d1) > reproduce (this is a W=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/26fdb8f3984ffbdb5= 7da2d1fac7e32ae418bfa96 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Zhen-Lei/kallsyms-Optimizes-the-= performance-of-lookup-symbols/20220919-231916 > git checkout 26fdb8f3984ffbdb57da2d1fac7e32ae418bfa96 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W= =3D1 O=3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash > = > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > = > All warnings (new ones prefixed by >>): > = >>> kernel/kallsyms.c:196:15: warning: no previous prototype for function '= kallsyms_sym_address' [-Wmissing-prototypes] > unsigned long kallsyms_sym_address(int idx) > ^ > kernel/kallsyms.c:196:1: note: declare 'static' if the function is not= intended to be used outside of this translation unit > unsigned long kallsyms_sym_address(int idx) > ^ Well, thanks. Because it's just for testing code, I'm thinking about not changing the header file, but it looks like I'll have to change it. > static = > kernel/kallsyms.c:668:12: warning: no previous prototype for function = 'arch_get_kallsym' [-Wmissing-prototypes] > int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, > ^ > kernel/kallsyms.c:668:1: note: declare 'static' if the function is not= intended to be used outside of this translation unit > int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, > ^ > static = > 2 warnings generated. > = > = > vim +/kallsyms_sym_address +196 kernel/kallsyms.c > = > 195 = > > 196 unsigned long kallsyms_sym_address(int idx) > 197 { > 198 if (!IS_ENABLED(CONFIG_KALLSYMS_BASE_RELATIVE)) > 199 return kallsyms_addresses[idx]; > 200 = > 201 /* values are unsigned offsets if --absolute-percpu is not in eff= ect */ > 202 if (!IS_ENABLED(CONFIG_KALLSYMS_ABSOLUTE_PERCPU)) > 203 return kallsyms_relative_base + (u32)kallsyms_offsets[idx]; > 204 = > 205 /* ...otherwise, positive offsets are absolute values */ > 206 if (kallsyms_offsets[idx] >=3D 0) > 207 return kallsyms_offsets[idx]; > 208 = > 209 /* ...and negative offsets are relative to kallsyms_relative_base= - 1 */ > 210 return kallsyms_relative_base - 1 - kallsyms_offsets[idx]; > 211 } > 212 = > = -- = Regards, Zhen Lei --===============3748950466343925745==--