public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: John Donnelly <john.p.donnelly@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 ] ipmi_si: Fix false error about IRQ registration
Date: Mon, 2 Mar 2020 09:36:03 -0600	[thread overview]
Message-ID: <20200302153603.GD3878@minyard.net> (raw)
In-Reply-To: <95A6B0CD-9C09-4165-AF60-A2789C53E926@oracle.com>

On Fri, Feb 28, 2020 at 03:28:04PM -0600, John Donnelly 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.
> 
> cc: stable@vger.kernel.org # 5.4.x

This looks good to me:

Acked-by: Corey Minyard <cminyard@mvista.com>

I've included in my tree for 5.7

-corey

> 
> Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
> ---
>  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
> 

      reply	other threads:[~2020-03-02 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 21:28 [PATCH v2 ] ipmi_si: Fix false error about IRQ registration John Donnelly
2020-03-02 15:36 ` Corey Minyard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200302153603.GD3878@minyard.net \
    --to=minyard@acm.org \
    --cc=john.p.donnelly@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox