* [PATCH] vfio: platform: Switch to platform_get_irq_optional()
@ 2020-03-02 20:37 Eric Auger
2020-03-04 10:39 ` Andre Przywara
0 siblings, 1 reply; 2+ messages in thread
From: Eric Auger @ 2020-03-02 20:37 UTC (permalink / raw)
To: eric.auger.pro, eric.auger, linux-kernel, kvm, alex.williamson
Cc: andre.przywara, stable, cohuck
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@redhat.com>
Cc: stable@vger.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vfio: platform: Switch to platform_get_irq_optional()
2020-03-02 20:37 [PATCH] vfio: platform: Switch to platform_get_irq_optional() Eric Auger
@ 2020-03-04 10:39 ` Andre Przywara
0 siblings, 0 replies; 2+ messages in thread
From: Andre Przywara @ 2020-03-04 10:39 UTC (permalink / raw)
To: Eric Auger
Cc: eric.auger.pro, linux-kernel, kvm, alex.williamson, stable, cohuck
On Mon, 2 Mar 2020 21:37:15 +0100
Eric Auger <eric.auger@redhat.com> wrote:
> 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.
Yes, that seems correct to me and avoids the false positive error message I saw before.
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> Cc: stable@vger.kernel.org # v5.3+
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Thanks!
Andre
> ---
> 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-04 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 20:37 [PATCH] vfio: platform: Switch to platform_get_irq_optional() Eric Auger
2020-03-04 10:39 ` Andre Przywara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).