Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Sergey Shtylyov <sergei.shtylyov@gmail.com>
To: Rosen Penev <rosenp@gmail.com>, linux-ide@vger.kernel.org
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ata: pata_mpc52xx: convert to platform_get_irq()
Date: Wed, 3 Jun 2026 22:38:29 +0300	[thread overview]
Message-ID: <1379ffa1-ccb8-4ca7-991f-b9a55d519baf@gmail.com> (raw)
In-Reply-To: <20260603192028.5818-1-rosenp@gmail.com>

On 6/3/26 10:20 PM, Rosen Penev wrote:

> Replace irq_of_parse_and_map() with platform_get_irq(), which returns
> a negative errno on failure and integrates with the platform device
> model. Since platform_get_irq() does not create a separately managed
> mapping, the corresponding irq_dispose_mapping() calls in the probe
> error path and remove function are no longer needed.
> 
> Assisted-by: opencode:big-pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/ata/pata_mpc52xx.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
> index 210a63283f62..f8ecd58765dd 100644
> --- a/drivers/ata/pata_mpc52xx.c
> +++ b/drivers/ata/pata_mpc52xx.c
> @@ -730,10 +730,10 @@ static int mpc52xx_ata_probe(struct platform_device *op)
>  	if ((prop) && (proplen >= 4))
>  		udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1);
>  
> -	ata_irq = irq_of_parse_and_map(op->dev.of_node, 0);
> -	if (!ata_irq) {
> +	ata_irq = platform_get_irq(op, 0);
> +	if (ata_irq < 0) {
>  		dev_err(&op->dev, "error mapping irq\n");

   s/mapping/getting/?
   But actually platform_get_irq() loudly curses on error already... :-)

[...]

MBR, Sergey


      parent reply	other threads:[~2026-06-03 19:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 19:20 [PATCH] ata: pata_mpc52xx: convert to platform_get_irq() Rosen Penev
2026-06-03 19:30 ` sashiko-bot
2026-06-03 19:38 ` Sergey Shtylyov [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=1379ffa1-ccb8-4ca7-991f-b9a55d519baf@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rosenp@gmail.com \
    /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