fs/proc/vmcore.c:443:42: warning: unused variable 'vmcore_mmap_ops'

From: kernel test robot
Date: Thu Apr 28 2022 - 18:34:36 EST


Hi Nick,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 249aca0d3d631660aa3583c6a3559b75b6e971b4
commit: 5640975003d0234da08559677e22ec25b9cb3267 RISC-V: Add crash kernel support
date: 1 year ago
config: riscv-randconfig-c006-20220428 (https://download.01.org/0day-ci/archive/20220429/202204290642.I2dLZBgO-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c59473aacce38cd7dd77eebceaf3c98c5707ab3b)
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/torvalds/linux.git/commit/?id=5640975003d0234da08559677e22ec25b9cb3267
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5640975003d0234da08559677e22ec25b9cb3267
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross

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

All warnings (new ones prefixed by >>):

>> fs/proc/vmcore.c:443:42: warning: unused variable 'vmcore_mmap_ops' [-Wunused-const-variable]
static const struct vm_operations_struct vmcore_mmap_ops = {
^
8 warnings generated.


vim +/vmcore_mmap_ops +443 fs/proc/vmcore.c

9cb218131de1c59 Michael Holzheu 2013-09-11 442
9cb218131de1c59 Michael Holzheu 2013-09-11 @443 static const struct vm_operations_struct vmcore_mmap_ops = {
9cb218131de1c59 Michael Holzheu 2013-09-11 444 .fault = mmap_vmcore_fault,
9cb218131de1c59 Michael Holzheu 2013-09-11 445 };
9cb218131de1c59 Michael Holzheu 2013-09-11 446

:::::: The code at line 443 was first introduced by commit
:::::: 9cb218131de1c59dca9063b2efe876f053f316af vmcore: introduce remap_oldmem_pfn_range()

:::::: TO: Michael Holzheu <holzheu@xxxxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

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