[openeuler:openEuler-1.0-LTS 1659/1659] mm/memory.c:4491:3: warning: cast from 'int (*)(unsigned long, unsigned long, struct cgp_args *)' to 'ktask_thread_func' (aka 'int (*)(void *, void *, void *)') converts to incompatible function type

tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 89f3a2595f2e3f14f976811d203bd8f55ff4eada commit: ae0cd4d46ced733c522f2cc6da2d380d69123fc4 [1659/1659] mm: parallelize clear_gigantic_page config: x86_64-buildonly-randconfig-001-20250606 (https://download.01.org/0day-ci/archive/20250606/202506061637.CVNqsEqf-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250606/202506061637.CVNqsEqf-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/202506061637.CVNqsEqf-lkp@intel.com/ All warnings (new ones prefixed by >>):
mm/memory.c:4491:3: warning: cast from 'int (*)(unsigned long, unsigned long, struct cgp_args *)' to 'ktask_thread_func' (aka 'int (*)(void *, void *, void *)') converts to incompatible function type [-Wcast-function-type-mismatch] 4491 | DEFINE_KTASK_CTL(ctl, clear_gigantic_page_chunk, &args, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4492 | KTASK_MEM_CHUNK); | ~~~~~~~~~~~~~~~~ include/linux/ktask.h:139:3: note: expanded from macro 'DEFINE_KTASK_CTL' 139 | KTASK_CTL_INITIALIZER(thread_func, func_arg, min_chunk_size) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ktask.h:123:21: note: expanded from macro 'KTASK_CTL_INITIALIZER' 123 | .kc_thread_func = (ktask_thread_func)(thread_func), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.
vim +4491 mm/memory.c 4480 4481 void clear_huge_page(struct page *page, 4482 unsigned long addr_hint, unsigned int pages_per_huge_page) 4483 { 4484 unsigned long addr = addr_hint & 4485 ~(((unsigned long)pages_per_huge_page << PAGE_SHIFT) - 1); 4486 4487 if (unlikely(pages_per_huge_page > MAX_ORDER_NR_PAGES)) { 4488 struct cgp_args args = {page, addr}; 4489 struct ktask_node node = {0, pages_per_huge_page, 4490 page_to_nid(page)};
4491 DEFINE_KTASK_CTL(ctl, clear_gigantic_page_chunk, &args, 4492 KTASK_MEM_CHUNK); 4493 4494 ktask_run_numa(&node, 1, &ctl); 4495 return; 4496 } 4497 4498 process_huge_page(addr_hint, pages_per_huge_page, clear_subpage, page); 4499 } 4500
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot