From: Wei Liu <wei.liu@kernel.org>
To: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Cc: mhklinux@outlook.com, kys@microsoft.com, haiyangz@microsoft.com,
wei.liu@kernel.org, decui@microsoft.com, longli@microsoft.com,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mshv: Store the result of vfs_poll in a variable of type __poll_t
Date: Thu, 15 Jan 2026 07:11:46 +0000 [thread overview]
Message-ID: <20260115071146.GD3557088@liuwe-devbox-debian-v2.local> (raw)
In-Reply-To: <49fd5523-f558-4ac0-b1a5-d0ead75bd9f3@linux.microsoft.com>
On Wed, Jan 14, 2026 at 10:40:04AM -0800, Nuno Das Neves wrote:
> On 1/14/2026 9:01 AM, mhkelley58@gmail.com wrote:
> > From: Michael Kelley <mhklinux@outlook.com>
> >
> > vfs_poll() returns a result of type __poll_t, but current code is using
> > an "unsigned int" local variable. The difference is that __poll_t carries
> > the "bitwise" attribute. This attribute is not interpreted by the C
> > compiler; it is only used by 'sparse' to flag incorrect usage of the
> > return value. The return value is used correctly here, so there's no
> > bug, but sparse complains about the type mismatch.
> >
> > In the interest of general correctness and to avoid noise from sparse,
> > change the local variable to type __poll_t. No functional change.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202512141339.791TCKnB-lkp@intel.com/
> > Signed-off-by: Michael Kelley <mhklinux@outlook.com>
> > ---
> > This change is not marked with a Fixes: tag as there's no value in
> > backporting to older stable releases.
> >
> > drivers/hv/mshv_eventfd.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hv/mshv_eventfd.c b/drivers/hv/mshv_eventfd.c
> > index d93a18f09c76..0b75ff1edb73 100644
> > --- a/drivers/hv/mshv_eventfd.c
> > +++ b/drivers/hv/mshv_eventfd.c
> > @@ -388,7 +388,7 @@ static int mshv_irqfd_assign(struct mshv_partition *pt,
> > {
> > struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL;
> > struct mshv_irqfd *irqfd, *tmp;
> > - unsigned int events;
> > + __poll_t events;
> > int ret;
> > int idx;
> >
>
> Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Applied.
prev parent reply other threads:[~2026-01-15 7:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 17:01 [PATCH 1/1] mshv: Store the result of vfs_poll in a variable of type __poll_t mhkelley58
2026-01-14 18:40 ` Nuno Das Neves
2026-01-15 7:11 ` Wei Liu [this message]
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=20260115071146.GD3557088@liuwe-devbox-debian-v2.local \
--to=wei.liu@kernel.org \
--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=nunodasneves@linux.microsoft.com \
/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