Skip to content

Commit e020f60

Browse files
mhklinuxliuw
authored andcommitted
mshv: Store the result of vfs_poll in a variable of type __poll_t
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> Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent 259add0 commit e020f60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hv/mshv_eventfd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ static int mshv_irqfd_assign(struct mshv_partition *pt,
388388
{
389389
struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL;
390390
struct mshv_irqfd *irqfd, *tmp;
391-
unsigned int events;
391+
__poll_t events;
392392
int ret;
393393
int idx;
394394

0 commit comments

Comments
 (0)