[block:for-5.15/block 48/54] mm/backing-dev.c:810:42: error: 'laptop_mode_timer_fn' undeclared

From: kernel test robot
Date: Wed Aug 11 2021 - 02:11:27 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.15/block
head: 99d26de2f6d79badc80f55b54bd90d4cb9d1ad90
commit: 5ed964f8e54eb3191b8b7b45aeb52672a0c995dc [48/54] mm: hide laptop_mode_wb_timer entirely behind the BDI API
config: sh-randconfig-r034-20210810 (attached as .config)
compiler: sh4-linux-gcc (GCC) 10.3.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
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=5ed964f8e54eb3191b8b7b45aeb52672a0c995dc
git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags block for-5.15/block
git checkout 5ed964f8e54eb3191b8b7b45aeb52672a0c995dc
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash

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

Note: the block/for-5.15/block HEAD 99d26de2f6d79badc80f55b54bd90d4cb9d1ad90 builds fine.
It only hurts bisectibility.

All errors (new ones prefixed by >>):

In file included from include/linux/workqueue.h:9,
from include/linux/mm_types.h:16,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:19,
from include/linux/fs.h:15,
from include/linux/backing-dev.h:13,
from mm/backing-dev.c:5:
mm/backing-dev.c: In function 'bdi_alloc':
>> mm/backing-dev.c:810:42: error: 'laptop_mode_timer_fn' undeclared (first use in this function)
810 | timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/timer.h:115:29: note: in definition of macro '__init_timer'
115 | init_timer_key((_timer), (_fn), (_flags), #_timer, &__key);\
| ^~~
mm/backing-dev.c:810:2: note: in expansion of macro 'timer_setup'
810 | timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
| ^~~~~~~~~~~
mm/backing-dev.c:810:42: note: each undeclared identifier is reported only once for each function it appears in
810 | timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/timer.h:115:29: note: in definition of macro '__init_timer'
115 | init_timer_key((_timer), (_fn), (_flags), #_timer, &__key);\
| ^~~
mm/backing-dev.c:810:2: note: in expansion of macro 'timer_setup'
810 | timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
| ^~~~~~~~~~~


vim +/laptop_mode_timer_fn +810 mm/backing-dev.c

794
795 struct backing_dev_info *bdi_alloc(int node_id)
796 {
797 struct backing_dev_info *bdi;
798
799 bdi = kzalloc_node(sizeof(*bdi), GFP_KERNEL, node_id);
800 if (!bdi)
801 return NULL;
802
803 if (bdi_init(bdi)) {
804 kfree(bdi);
805 return NULL;
806 }
807 bdi->capabilities = BDI_CAP_WRITEBACK | BDI_CAP_WRITEBACK_ACCT;
808 bdi->ra_pages = VM_READAHEAD_PAGES;
809 bdi->io_pages = VM_READAHEAD_PAGES;
> 810 timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
811 return bdi;
812 }
813 EXPORT_SYMBOL(bdi_alloc);
814

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

Attachment: .config.gz
Description: application/gzip