Skip to contentSkip to conversation

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

DISCUSSION kernel test robot 1 participant 1 message Jan 16

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
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/[email protected]/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/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

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

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