From: Naman Jain <namjain@linux.microsoft.com>
To: mhklinux@outlook.com, kys@microsoft.com, haiyangz@microsoft.com,
wei.liu@kernel.org, decui@microsoft.com, longli@microsoft.com,
linux-hyperv@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mshv: Fix compiler warning about cast converting incompatible function type
Date: Mon, 19 Jan 2026 11:02:01 +0530 [thread overview]
Message-ID: <e99513ac-a790-424b-9b80-4a91fd87cba2@linux.microsoft.com> (raw)
In-Reply-To: <20260118170245.160050-1-mhklinux@outlook.com>
On 1/18/2026 10:32 PM, mhkelley58@gmail.com wrote:
> From: Michael Kelley <mhklinux@outlook.com>
>
> 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>
> ---
> drivers/hv/mshv_vtl_main.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hv/mshv_vtl_main.c b/drivers/hv/mshv_vtl_main.c
> index 2cebe9de5a5a..7bbbce009732 100644
> --- a/drivers/hv/mshv_vtl_main.c
> +++ b/drivers/hv/mshv_vtl_main.c
> @@ -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);
Thank you Michael for fixing this.
Reviewed-by: Naman Jain <namjain@linux.microsoft.com>
next prev parent reply other threads:[~2026-01-19 5:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 17:02 [PATCH 1/1] mshv: Fix compiler warning about cast converting incompatible function type mhkelley58
2026-01-19 5:32 ` Naman Jain [this message]
2026-02-04 6:08 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e99513ac-a790-424b-9b80-4a91fd87cba2@linux.microsoft.com \
--to=namjain@linux.microsoft.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mhklinux@outlook.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox