2020-02-28 21:23:06

by John Donnelly

[permalink] [raw]
Subject: [PATCH ] ipmi_si: Fix false error about IRQ registration

Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
to platform_get_irq()"), platform_get_irq() will call dev_err() on an
error, even though the IRQ usage in the ipmi_si driver is optional.

Use the platform_get_irq_optional() call to avoid the message from
alerting users with false alarms.

Orabug: 30970275

Signed-off-by: John Donnelly <[email protected]>
---
drivers/char/ipmi/ipmi_si_platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c
index c78127ccbc0d..638c693e17ad 100644
--- a/drivers/char/ipmi/ipmi_si_platform.c
+++ b/drivers/char/ipmi/ipmi_si_platform.c
@@ -194,7 +194,7 @@ static int platform_ipmi_probe(struct platform_device *pdev)
else
io.slave_addr = slave_addr;

- io.irq = platform_get_irq(pdev, 0);
+ io.irq = platform_get_irq_optional(pdev, 0);
if (io.irq > 0)
io.irq_setup = ipmi_std_irq_setup;
else
@@ -378,7 +378,7 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
io.irq = tmp;
io.irq_setup = acpi_gpe_irq_setup;
} else {
- int irq = platform_get_irq(pdev, 0);
+ int irq = platform_get_irq_optional(pdev, 0);

if (irq > 0) {
io.irq = irq;
--
2.20.1


2020-02-28 21:26:26

by John Donnelly

[permalink] [raw]
Subject: Re: [PATCH ] ipmi_si: Fix false error about IRQ registration

Please Ignore .

Let me correct the contents in v2


> On Feb 28, 2020, at 3:22 PM, John Donnelly <[email protected]> wrote:
>
> Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
> to platform_get_irq()"), platform_get_irq() will call dev_err() on an
> error, even though the IRQ usage in the ipmi_si driver is optional.
>
> Use the platform_get_irq_optional() call to avoid the message from
> alerting users with false alarms.
>
> Orabug: 30970275
>
> Signed-off-by: John Donnelly <[email protected]>
> ---
> drivers/char/ipmi/ipmi_si_platform.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c
> index c78127ccbc0d..638c693e17ad 100644
> --- a/drivers/char/ipmi/ipmi_si_platform.c
> +++ b/drivers/char/ipmi/ipmi_si_platform.c
> @@ -194,7 +194,7 @@ static int platform_ipmi_probe(struct platform_device *pdev)
> else
> io.slave_addr = slave_addr;
>
> - io.irq = platform_get_irq(pdev, 0);
> + io.irq = platform_get_irq_optional(pdev, 0);
> if (io.irq > 0)
> io.irq_setup = ipmi_std_irq_setup;
> else
> @@ -378,7 +378,7 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
> io.irq = tmp;
> io.irq_setup = acpi_gpe_irq_setup;
> } else {
> - int irq = platform_get_irq(pdev, 0);
> + int irq = platform_get_irq_optional(pdev, 0);
>
> if (irq > 0) {
> io.irq = irq;
> --
> 2.20.1