tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 47d9bb711707d15b19fad18c8e2b4b027a264a3a commit: f59d77dc3eea31329e70dbc9ba6fea9faa24829f [10295/10848] x86/crash: add x86 crash hotplug support config: x86_64-randconfig-r024-20230821 (https://download.01.org/0day-ci/archive/20230822/202308220012.gipltORx-lkp@xxxxxxxxx/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230822/202308220012.gipltORx-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202308220012.gipltORx-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> arch/x86/kernel/crash.c:232:12: warning: 'prepare_elf_headers' defined but not used [-Wunused-function] 232 | static int prepare_elf_headers(struct kimage *image, void **addr, | ^~~~~~~~~~~~~~~~~~~ vim +/prepare_elf_headers +232 arch/x86/kernel/crash.c dd5f726076cc763 Vivek Goyal 2014-08-08 230 dd5f726076cc763 Vivek Goyal 2014-08-08 231 /* Prepare elf headers. Return addr and size */ dd5f726076cc763 Vivek Goyal 2014-08-08 @232 static int prepare_elf_headers(struct kimage *image, void **addr, f59d77dc3eea313 Eric DeVolder 2023-08-14 233 unsigned long *sz, unsigned long *nr_mem_ranges) dd5f726076cc763 Vivek Goyal 2014-08-08 234 { 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13 235 struct crash_mem *cmem; 7c321eb2b843bf2 Lianbo Jiang 2019-11-08 236 int ret; dd5f726076cc763 Vivek Goyal 2014-08-08 237 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13 238 cmem = fill_up_crash_elf_data(); 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13 239 if (!cmem) dd5f726076cc763 Vivek Goyal 2014-08-08 240 return -ENOMEM; dd5f726076cc763 Vivek Goyal 2014-08-08 241 9eff303725da653 Borislav Petkov 2019-11-14 242 ret = walk_system_ram_res(0, -1, cmem, prepare_elf64_ram_headers_callback); cbe6601617302b0 AKASHI Takahiro 2018-04-13 243 if (ret) cbe6601617302b0 AKASHI Takahiro 2018-04-13 244 goto out; cbe6601617302b0 AKASHI Takahiro 2018-04-13 245 cbe6601617302b0 AKASHI Takahiro 2018-04-13 246 /* Exclude unwanted mem ranges */ 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13 247 ret = elf_header_exclude_ranges(cmem); cbe6601617302b0 AKASHI Takahiro 2018-04-13 248 if (ret) cbe6601617302b0 AKASHI Takahiro 2018-04-13 249 goto out; cbe6601617302b0 AKASHI Takahiro 2018-04-13 250 f59d77dc3eea313 Eric DeVolder 2023-08-14 251 /* Return the computed number of memory ranges, for hotplug usage */ f59d77dc3eea313 Eric DeVolder 2023-08-14 252 *nr_mem_ranges = cmem->nr_ranges; f59d77dc3eea313 Eric DeVolder 2023-08-14 253 dd5f726076cc763 Vivek Goyal 2014-08-08 254 /* By default prepare 64bit headers */ 9eff303725da653 Borislav Petkov 2019-11-14 255 ret = crash_prepare_elf64_headers(cmem, IS_ENABLED(CONFIG_X86_64), addr, sz); cbe6601617302b0 AKASHI Takahiro 2018-04-13 256 cbe6601617302b0 AKASHI Takahiro 2018-04-13 257 out: 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13 258 vfree(cmem); dd5f726076cc763 Vivek Goyal 2014-08-08 259 return ret; dd5f726076cc763 Vivek Goyal 2014-08-08 260 } f59d77dc3eea313 Eric DeVolder 2023-08-14 261 #endif dd5f726076cc763 Vivek Goyal 2014-08-08 262 :::::: The code at line 232 was first introduced by commit :::::: dd5f726076cc7639d9713b334c8c133f77c6757a kexec: support for kexec on panic using new system call :::::: TO: Vivek Goyal <vgoyal@xxxxxxxxxx> :::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki