]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mshv: Fix compiler warning about cast converting incompatible function type
authorMichael Kelley <mhklinux@outlook.com>
Sun, 18 Jan 2026 17:02:45 +0000 (09:02 -0800)
committerWei Liu <wei.liu@kernel.org>
Wed, 4 Feb 2026 06:08:05 +0000 (06:08 +0000)
In mshv_vtl_sint_ioctl_pause_msg_stream(), the reference to function
mshv_vtl_synic_mask_vmbus_sint() is cast to type smp_call_func_t. The
cast generates a compiler warning because the function signature of
mshv_vtl_synic_mask_vmbus_sint() doesn't match smp_call_func_t.

There's no actual bug here because the mis-matched function signatures
are compatible at runtime. Nonetheless, eliminate the compiler warning
by changing the function signature of mshv_vtl_synic_mask_vmbus_sint()
to match what on_each_cpu() expects. Remove the cast because it is then
no longer necessary.

No functional change.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601170352.qbh3EKH5-lkp@intel.com/
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Naman Jain <namjain@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/mshv_vtl_main.c

index 2cebe9de5a5a216044e66656be35bf5c7d8899ff..7bbbce00973276ef957d091a9d633d50d70d8d28 100644 (file)
@@ -845,9 +845,10 @@ static const struct file_operations mshv_vtl_fops = {
        .mmap = mshv_vtl_mmap,
 };
 
-static void mshv_vtl_synic_mask_vmbus_sint(const u8 *mask)
+static void mshv_vtl_synic_mask_vmbus_sint(void *info)
 {
        union hv_synic_sint sint;
+       const u8 *mask = info;
 
        sint.as_uint64 = 0;
        sint.vector = HYPERVISOR_CALLBACK_VECTOR;
@@ -999,7 +1000,7 @@ static int mshv_vtl_sint_ioctl_pause_msg_stream(struct mshv_sint_mask __user *ar
        if (copy_from_user(&mask, arg, sizeof(mask)))
                return -EFAULT;
        guard(mutex)(&vtl2_vmbus_sint_mask_mutex);
-       on_each_cpu((smp_call_func_t)mshv_vtl_synic_mask_vmbus_sint, &mask.mask, 1);
+       on_each_cpu(mshv_vtl_synic_mask_vmbus_sint, &mask.mask, 1);
        WRITE_ONCE(vtl_synic_mask_vmbus_sint_masked, mask.mask != 0);
        if (mask.mask)
                wake_up_interruptible_poll(&fd_wait_queue, EPOLLIN);