drivers/hv/mshv_vtl_main.c:1002:14: warning: cast from 'void (*)(const u8 *)' (aka 'void (*)(const unsigned char *)') to 'smp_call_func_t' (aka 'void (*)(void *)') converts to incompatible function type

From: kernel test robot

Date: Fri Jan 16 2026 - 14:17:19 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 983d014aafb14ee5e4915465bf8948e8f3a723b5
commit: 7bfe3b8ea6e30437e01fcb8e4f56ef6e4d986d0f Drivers: hv: Introduce mshv_vtl driver
date: 6 weeks ago
config: x86_64-buildonly-randconfig-001-20260117 (https://download.01.org/0day-ci/archive/20260117/202601170352.qbh3EKH5-lkp@xxxxxxxxx/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260117/202601170352.qbh3EKH5-lkp@xxxxxxxxx/reproduce)

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601170352.qbh3EKH5-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/hv/mshv_vtl_main.c:1002:14: warning: cast from 'void (*)(const u8 *)' (aka 'void (*)(const unsigned char *)') to 'smp_call_func_t' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
1002 | on_each_cpu((smp_call_func_t)mshv_vtl_synic_mask_vmbus_sint, &mask.mask, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.


vim +1002 drivers/hv/mshv_vtl_main.c

993
994 static int mshv_vtl_sint_ioctl_pause_msg_stream(struct mshv_sint_mask __user *arg)
995 {
996 static DEFINE_MUTEX(vtl2_vmbus_sint_mask_mutex);
997 struct mshv_sint_mask mask;
998
999 if (copy_from_user(&mask, arg, sizeof(mask)))
1000 return -EFAULT;
1001 guard(mutex)(&vtl2_vmbus_sint_mask_mutex);
> 1002 on_each_cpu((smp_call_func_t)mshv_vtl_synic_mask_vmbus_sint, &mask.mask, 1);
1003 WRITE_ONCE(vtl_synic_mask_vmbus_sint_masked, mask.mask != 0);
1004 if (mask.mask)
1005 wake_up_interruptible_poll(&fd_wait_queue, EPOLLIN);
1006
1007 return 0;
1008 }
1009

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki