[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200302203715.13889-1-eric.auger@redhat.com>
Date: Mon, 2 Mar 2020 21:37:15 +0100
From: Eric Auger <eric.auger@...hat.com>
To: eric.auger.pro@...il.com, eric.auger@...hat.com,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
alex.williamson@...hat.com
Cc: andre.przywara@....com, stable@...r.kernel.org, cohuck@...hat.com
Subject: [PATCH] vfio: platform: Switch to platform_get_irq_optional()
Since commit 7723f4c5ecdb ("driver core: platform: Add an error
message to platform_get_irq*()"), platform_get_irq() calls dev_err()
on an error. As we enumerate all interrupts until platform_get_irq()
fails, we now systematically get a message such as:
"vfio-platform fff51000.ethernet: IRQ index 3 not found" which is
a false positive.
Let's use platform_get_irq_optional() instead.
Signed-off-by: Eric Auger <eric.auger@...hat.com>
Cc: stable@...r.kernel.org # v5.3+
---
drivers/vfio/platform/vfio_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
index ae1a5eb98620..1e2769010089 100644
--- a/drivers/vfio/platform/vfio_platform.c
+++ b/drivers/vfio/platform/vfio_platform.c
@@ -44,7 +44,7 @@ static int get_platform_irq(struct vfio_platform_device *vdev, int i)
{
struct platform_device *pdev = (struct platform_device *) vdev->opaque;
- return platform_get_irq(pdev, i);
+ return platform_get_irq_optional(pdev, i);
}
static int vfio_platform_probe(struct platform_device *pdev)
--
2.20.1
Powered by blists - more mailing lists