[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 - 03:47:26 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: arm-randconfig-r024-20210809 (attached as .config)
compiler: arm-linux-gnueabi-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=arm 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:126:28: note: in definition of macro '__init_timer'
126 | init_timer_key((_timer), (_fn), (_flags), NULL, NULL)
| ^~~
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:126:28: note: in definition of macro '__init_timer'
126 | init_timer_key((_timer), (_fn), (_flags), NULL, NULL)
| ^~~
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/page-writeback.c:2013:6: warning: no previous prototype for 'laptop_mode_timer_fn' [-Wmissing-prototypes]
2013 | void laptop_mode_timer_fn(struct timer_list *t)
| ^~~~~~~~~~~~~~~~~~~~
mm/page-writeback.c:2026:6: warning: no previous prototype for 'laptop_io_completion' [-Wmissing-prototypes]
2026 | void laptop_io_completion(struct backing_dev_info *info)
| ^~~~~~~~~~~~~~~~~~~~
>> mm/page-writeback.c:2036:6: error: redefinition of 'laptop_sync_completion'
2036 | void laptop_sync_completion(void)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from mm/page-writeback.c:20:
include/linux/writeback.h:345:20: note: previous definition of 'laptop_sync_completion' was here
345 | static inline void laptop_sync_completion(void) { }
| ^~~~~~~~~~~~~~~~~~~~~~
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