[openeuler:openEuler-1.0-LTS 1597/1597] include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used

Hi Zhang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 230c2b30f879859ac3e9d3cc46407a9dbb103160 commit: 1811840c2cdebd0820818392a8217ffbd1be5c67 [1597/1597] mm/sharepool: Fix sharepool node id invalid when using sp_alloc config: arm64-randconfig-004-20250429 (https://download.01.org/0day-ci/archive/20250429/202504290804.SFjtS4nf-lkp@i...) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250429/202504290804.SFjtS4nf-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202504290804.SFjtS4nf-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/shmem_fs.h:7, from mm/truncate.c:23:
include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ -- mm/mmap.c: In function 'acct_stack_growth': mm/mmap.c:2584:16: warning: variable 'new_start' set but not used [-Wunused-but-set-variable] 2584 | unsigned long new_start; | ^~~~~~~~~ In file included from include/linux/shmem_fs.h:7, from mm/mmap.c:28: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ -- mm/vmscan.c: In function 'kernel_swap_check': mm/vmscan.c:3264:21: error: implicit declaration of function 'kernel_swap_enabled'; did you mean 'kernfs_ns_enabled'? [-Werror=implicit-function-declaration] 3264 | if (sc != NULL && !kernel_swap_enabled()) | ^~~~~~~~~~~~~~~~~~~ | kernfs_ns_enabled mm/vmscan.c: In function 'try_to_free_mem_cgroup_pages': mm/vmscan.c:3360:6: warning: variable 'nid' set but not used [-Wunused-but-set-variable] 3360 | int nid; | ^~~ mm/vmscan.c: In function 'get_swapcache_reclaim_num': mm/vmscan.c:4683:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 4683 | return total_swapcache_pages() > | ^ In file included from mm/vmscan.c:39: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/linux/page_counter.h:6, from mm/memcontrol.c:34: mm/memcontrol.c: In function 'mem_cgroup_get_max': include/linux/kernel.h:884:39: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 884 | #define min(x, y) __careful_cmp(x, y, <) | ^ include/linux/kernel.h:867:30: note: in definition of macro '__cmp' 867 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) | ^~ include/linux/kernel.h:884:19: note: in expansion of macro '__careful_cmp' 884 | #define min(x, y) __careful_cmp(x, y, <) | ^~~~~~~~~~~~~ mm/memcontrol.c:1506:14: note: in expansion of macro 'min' 1506 | swap_max = min(swap_max, (unsigned long)total_swap_pages); | ^~~ In file included from include/linux/shmem_fs.h:7, from mm/memcontrol.c:39: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ mm/memcontrol.c:6306: warning: bad line: | 0, otherwise. -- mm/page_alloc.c:1489:6: warning: no previous prototype for 'set_zone_contiguous' [-Wmissing-prototypes] 1489 | void set_zone_contiguous(struct zone *zone) | ^~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:1511:6: warning: no previous prototype for 'clear_zone_contiguous' [-Wmissing-prototypes] 1511 | void clear_zone_contiguous(struct zone *zone) | ^~~~~~~~~~~~~~~~~~~~~ In file included from mm/page_alloc.c:43: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ mm/page_alloc.c:3083: warning: Function parameter or member 'mt' not described in '__putback_isolated_page' -- mm/workingset.c: In function 'unpack_shadow': mm/workingset.c:187:15: warning: variable 'nid' set but not used [-Wunused-but-set-variable] 187 | int memcgid, nid; | ^~~ In file included from include/linux/shmem_fs.h:7, from mm/workingset.c:10: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ -- mm/memory.c: In function 'vm_insert_page': mm/memory.c:1554:10: error: implicit declaration of function 'hugetlb_insert_hugepage_pte_by_pa'; did you mean 'hugetlb_insert__hugepage_pte_by_pa'? [-Werror=implicit-function-declaration] 1554 | return hugetlb_insert_hugepage_pte_by_pa(vma->vm_mm, addr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | hugetlb_insert__hugepage_pte_by_pa In file included from mm/memory.c:72: mm/memory.c: In function 'clear_huge_page': include/linux/ktask.h:123:21: warning: cast between incompatible function types from 'int (*)(long unsigned int, long unsigned int, struct cgp_args *)' to 'int (*)(void *, void *, void *)' [-Wcast-function-type] 123 | .kc_thread_func = (ktask_thread_func)(thread_func), \ | ^ include/linux/ktask.h:139:3: note: in expansion of macro 'KTASK_CTL_INITIALIZER' 139 | KTASK_CTL_INITIALIZER(thread_func, func_arg, min_chunk_size) \ | ^~~~~~~~~~~~~~~~~~~~~ mm/memory.c:4754:3: note: in expansion of macro 'DEFINE_KTASK_CTL' 4754 | DEFINE_KTASK_CTL(ctl, clear_gigantic_page_chunk, &args, | ^~~~~~~~~~~~~~~~ In file included from include/linux/migrate.h:6, from mm/memory.c:65: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from mm/oom_kill.c:35: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ mm/oom_kill.c:328: warning: Function parameter or member 'task' not described in 'oom_next_task' mm/oom_kill.c:328: warning: Function parameter or member 'oc' not described in 'oom_next_task' mm/oom_kill.c:328: warning: Function parameter or member 'points' not described in 'oom_next_task' -- In file included from include/linux/shmem_fs.h:7, from mm/khugepaged.c:20: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ mm/khugepaged.c:1348: warning: Function parameter or member 'mm' not described in 'collapse_shmem' mm/khugepaged.c:1348: warning: Function parameter or member 'mapping' not described in 'collapse_shmem' mm/khugepaged.c:1348: warning: Function parameter or member 'start' not described in 'collapse_shmem' mm/khugepaged.c:1348: warning: Function parameter or member 'hpage' not described in 'collapse_shmem' mm/khugepaged.c:1348: warning: Function parameter or member 'node' not described in 'collapse_shmem' mm/khugepaged.c:1348: warning: Function parameter or member 'reliable' not described in 'collapse_shmem'
vim +/__do_mbind +329 include/linux/mempolicy.h 328
329 static long __do_mbind(unsigned long start, unsigned long len,
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot