mm/filemap.c:2190:6: warning: unused function 'folio_more_pages'
From: kernel test robot
Date: Wed Jan 18 2023 - 09:29:24 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c1649ec55708ae42091a2f1bca1ab49ecd722d55
commit: 48658d8509d2db3391c95aa74308a2b1fc8e8461 filemap: remove find_get_pages_contig()
date: 4 months ago
config: arm-randconfig-r026-20230116 (https://download.01.org/0day-ci/archive/20230118/202301182254.XhRmZw9A-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 4196ca3278f78c6e19246e54ab0ecb364e37d66a)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=48658d8509d2db3391c95aa74308a2b1fc8e8461
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 48658d8509d2db3391c95aa74308a2b1fc8e8461
# 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=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> mm/filemap.c:2190:6: warning: unused function 'folio_more_pages' [-Wunused-function]
bool folio_more_pages(struct folio *folio, pgoff_t index, pgoff_t max)
^
1 warning generated.
vim +/folio_more_pages +2190 mm/filemap.c
be0ced5e9cb81a Matthew Wilcox (Oracle 2022-06-03 2188)
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 2189) static inline
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 @2190) bool folio_more_pages(struct folio *folio, pgoff_t index, pgoff_t max)
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 2191) {
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 2192) if (!folio_test_large(folio) || folio_test_hugetlb(folio))
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 2193) return false;
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 2194) if (index >= max)
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 2195) return false;
6b24ca4a1a8d4e Matthew Wilcox (Oracle 2020-06-27 2196) return index < folio->index + folio_nr_pages(folio) - 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2197 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2198
:::::: The code at line 2190 was first introduced by commit
:::::: 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3 mm: Use multi-index entries in the page cache
:::::: TO: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
:::::: CC: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests