From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 193792032D for ; Thu, 29 Jan 2026 15:52:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769701922; cv=none; b=ot1r7eIq0ubpECo85ZsyXwYs8rCUoz86YgQw/2NxLBsBhmcRmzyzm+83sOk1exQv9Ofjom13DBqAFMXRZpt2MHEYgt8FipWj4pPr1tDEns3u65XPoPTE56xhs4H4PRoYmzpPquD4KQHzVKqAwg4DrQRirYSH4tTbjrzXUcKWVOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769701922; c=relaxed/simple; bh=NO+fiRumn7KoZ7PSTAeJV87vt5PU1U9wXLeYYEWzSto=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tvk7L783Ia7pbRbn0NJkEz3qSxZVSjICkCkmf5CvCSt7p2gFJ15FtI4s8oZAeUzRh/fznJ+6r3N7IvAA/DR3dQ0/U6w7L6iwJEyK5DOfkYaCr0KwI9uZl4zZvcIgePT9p1Ng0C6ekwK0Bz715JUr4ExBFNMyBv3AWbg8CLG/UOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dGGgOVh4; arc=none smtp.client-ip=209.85.214.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dGGgOVh4" Received: by mail-pl1-f195.google.com with SMTP id d9443c01a7336-29efd139227so7322535ad.1 for ; Thu, 29 Jan 2026 07:52:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769701920; x=1770306720; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=PJlzyqmv4WLBf0ez9Dt+WeFT8QaTCnpA0lcmS7CpNIo=; b=dGGgOVh4vvj36tKxL+/bOVHpmVViMiVGg6URqy6UDxYnvDs3drcqPZ8YK53OfFsWFC eShN0nr5PH6xlG+HMLYOH4Jyb5kfENn+87xWhLG7daLdaEDo7AJRkSKRJ7ou9ezPqGWy UfYwS9/INrxFZJFWcFSGzkx36f9+qXXW1eOQsRWsVjS2Twn+4emP7ki814plvfGXJ7ZS tahI585SjW8vmnFkB71bR1BbfLqp0fcEW34dz9s9de6ylS8gY6EcvnVhx3MxdjPWdx9k KhrCTnVF4Zl5L2ZT8x/v3hogTYMF8IV51iRsii61s6y/QFNDVqe+LVGFPjY6rYcYqvxA X3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769701920; x=1770306720; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=PJlzyqmv4WLBf0ez9Dt+WeFT8QaTCnpA0lcmS7CpNIo=; b=SflB3DBi+3r7RBURElYW6zEQhbpLXpQLF8y5Y2MOjsmO7qKuajKOH7Ap7QrYEdwKpo cmPP9s3JFQMCeGTy27iOf6QLE81wJM7ymMcvbveWvx+5WJytNSkgYwGs4qmAWbiRTZvN 8mX+s39tUpZY61lxjrEywktjiGzOVY8cTADIiuOrK2L29NTcec+yn0K33zJ/N5le1tdm fad+7XR6H2/LYwwPTlRRHIZ7MgiCbWonbyMaOX8V9it1P6MNmwM1b1Q2f8nxcpH2T2g2 fPzqCyP0d4YS3EQXoL/VVvUMEGPD0ygM9ckC4TvpM2eFg40pMdfvMPhEXRHzS9vqsTc9 p5YA== X-Gm-Message-State: AOJu0YxUaPYm5k0jgv9tZ1vkMG7l/UJnjKe80ZMLK38cG4AlEHhGl89k oFyezAgIM0PgYZXfJ+SfYol7M0EHIAivS9QqFjaeGjexiApJvdLKMgPy X-Gm-Gg: AZuq6aL8DNTVF2rj9w0/TKmWuVU+80WCeApgAHf/dbSXNH+VyFiznpQyF0ZykuRgzJu c58KOgcPl9WCNoiWAc425JCGg6D2i0Awis5ULYEv/k6O5NZ0eKogT9WegSGgJemNA2q/VLInovv CJqpJzuHIl+s9ufVmXRD2lGt3TTdxIQAXun5/d1ahd6TOSHXAyOFPAyGY70Ekbvi3n4tWjtqZyT Y/uTVKJtoxW5BGqOxBV84egh2ompnHOPUUZN3Vq+5ayJKhWSS3p9KC7+aS0GoohjOnCi41nEXuE SSdWw5kpUBiAjmpcG66sxUBF6HxVVtPsZ4Ao/VzdFljwFZc/2uxDp0ixaVbseQId6e3yJ8CIZqi D/1splUEECedDuH460rvnedH7rJ3jhUp3lbU5h/JtDRpIX8h+h5r0TnCy+IxkXAOOywIoIneSR3 MFF2ZBXu5QeFne1SZB+4VeCUkc3JApAQ9TToNwm/3BVM5gR559wNSkCVuHTIH4Ky9bcy0zLvUBq E0H X-Received: by 2002:a17:902:db0d:b0:2a7:cf3e:506d with SMTP id d9443c01a7336-2a870eb4350mr85777575ad.60.1769701920193; Thu, 29 Jan 2026 07:52:00 -0800 (PST) Received: from localhost.localdomain (c-174-165-208-10.hsd1.wa.comcast.net. [174.165.208.10]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b5d985asm53878735ad.73.2026.01.29.07.51.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 07:51:59 -0800 (PST) From: mhkelley58@gmail.com X-Google-Original-From: mhklinux@outlook.com To: 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: [PATCH 1/1] mshv: Use EPOLLIN and EPOLLHUP instead of POLLIN and POLLHUP Date: Thu, 29 Jan 2026 07:51:54 -0800 Message-Id: <20260129155154.484671-1-mhklinux@outlook.com> X-Mailer: git-send-email 2.25.1 Reply-To: mhklinux@outlook.com Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Michael Kelley mshv code currently uses the POLLIN and POLLHUP flags. Starting with commit a9a08845e9acb ("vfs: do bulk POLL* -> EPOLL* replacement") the intent is to use the EPOLL* versions throughout the kernel. The comment at the top of mshv_eventfd.c describes it as being inspired by the KVM implementation, which was changed by the above mentioned commit in 2018 to use EPOLL*. mshv_eventfd.c is much newer than 2018 and there's no statement as to why it must use the POLL* versions. So change it to use the EPOLL* versions. This change also resolves a 'sparse' warning. No functional change, and the generated code is the same. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202601220948.MUTO60W4-lkp@intel.com/ Signed-off-by: Michael Kelley --- drivers/hv/mshv_eventfd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hv/mshv_eventfd.c b/drivers/hv/mshv_eventfd.c index 0b75ff1edb73..dfc8b1092c02 100644 --- a/drivers/hv/mshv_eventfd.c +++ b/drivers/hv/mshv_eventfd.c @@ -295,13 +295,13 @@ static int mshv_irqfd_wakeup(wait_queue_entry_t *wait, unsigned int mode, { struct mshv_irqfd *irqfd = container_of(wait, struct mshv_irqfd, irqfd_wait); - unsigned long flags = (unsigned long)key; + __poll_t flags = key_to_poll(key); int idx; unsigned int seq; struct mshv_partition *pt = irqfd->irqfd_partn; int ret = 0; - if (flags & POLLIN) { + if (flags & EPOLLIN) { u64 cnt; eventfd_ctx_do_read(irqfd->irqfd_eventfd_ctx, &cnt); @@ -320,7 +320,7 @@ static int mshv_irqfd_wakeup(wait_queue_entry_t *wait, unsigned int mode, ret = 1; } - if (flags & POLLHUP) { + if (flags & EPOLLHUP) { /* The eventfd is closing, detach from the partition */ unsigned long flags; @@ -506,7 +506,7 @@ static int mshv_irqfd_assign(struct mshv_partition *pt, */ events = vfs_poll(fd_file(f), &irqfd->irqfd_polltbl); - if (events & POLLIN) + if (events & EPOLLIN) mshv_assert_irq_slow(irqfd); srcu_read_unlock(&pt->pt_irq_srcu, idx); -- 2.25.1