[willy-pagecache:for-next 46/48] mm/shmem.c:154:5: warning: no previous prototype for 'shmem_get_folio'

From: kernel test robot
Date: Thu Dec 09 2021 - 04:15:21 EST


tree: git://git.infradead.org/users/willy/pagecache for-next
head: 9244dddc51b5e46444a334c881372aa66138f74a
commit: 1be265f951d0eefea0f8a2aafef4dd18d8ad2719 [46/48] truncate,shmem: Handle truncates that split large folios
config: arc-randconfig-r043-20211207 (https://download.01.org/0day-ci/archive/20211209/202112091729.kMRPshvJ-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 11.2.0
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
git remote add willy-pagecache git://git.infradead.org/users/willy/pagecache
git fetch --no-tags willy-pagecache for-next
git checkout 1be265f951d0eefea0f8a2aafef4dd18d8ad2719
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> mm/shmem.c:154:5: warning: no previous prototype for 'shmem_get_folio' [-Wmissing-prototypes]
154 | int shmem_get_folio(struct inode *inode, pgoff_t index,
| ^~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:88,
from mm/shmem.c:75:
arch/arc/include/asm/perf_event.h:126:27: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~


vim +/shmem_get_folio +154 mm/shmem.c

153
> 154 int shmem_get_folio(struct inode *inode, pgoff_t index,
155 struct folio **foliop, enum sgp_type sgp)
156 {
157 struct page *page = NULL;
158 int ret = shmem_getpage(inode, index, &page, sgp);
159
160 if (page)
161 *foliop = page_folio(page);
162 else
163 *foliop = NULL;
164 return ret;
165 }
166

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx