* [PATCHv2] ata: sata_mv: Use platform_get_irq() to get interrupt
@ 2026-07-12 22:20 Rosen Penev
2026-07-18 3:01 ` Damien Le Moal
0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-07-12 22:20 UTC (permalink / raw)
To: linux-ide; +Cc: Damien Le Moal, Niklas Cassel, open list
Extract platform_get_irq() out of the conditional block to run it
unconditionally, replacing the direct use of irq_of_parse_and_map()
for DT-based systems. This simplifies the probe logic and avoids the
need for irq_dispose_mapping.
Remove dead branch for platform_get_irq(). It intercepts 0 and returns
-EINVAL, which goes to the first one.
Assisted-by: Antigravity:Gemini-3.5-Flash
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
v2: remove dead branch
drivers/ata/sata_mv.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 41647a56a9f4..a2bf9551a600 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4054,17 +4054,13 @@ static int mv_platform_probe(struct platform_device *pdev)
n_ports);
return -EINVAL;
}
-
- irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
} else {
mv_platform_data = dev_get_platdata(&pdev->dev);
n_ports = mv_platform_data->n_ports;
- irq = platform_get_irq(pdev, 0);
}
+ irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
- if (!irq)
- return -EINVAL;
host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);
hpriv = devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL);
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCHv2] ata: sata_mv: Use platform_get_irq() to get interrupt
2026-07-12 22:20 [PATCHv2] ata: sata_mv: Use platform_get_irq() to get interrupt Rosen Penev
@ 2026-07-18 3:01 ` Damien Le Moal
0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2026-07-18 3:01 UTC (permalink / raw)
To: Rosen Penev, linux-ide; +Cc: Niklas Cassel, open list
On 7/13/26 07:20, Rosen Penev wrote:
> Extract platform_get_irq() out of the conditional block to run it
> unconditionally, replacing the direct use of irq_of_parse_and_map()
> for DT-based systems. This simplifies the probe logic and avoids the
> need for irq_dispose_mapping.
>
> Remove dead branch for platform_get_irq(). It intercepts 0 and returns
> -EINVAL, which goes to the first one.
>
> Assisted-by: Antigravity:Gemini-3.5-Flash
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Applied to for-7.3. Thanks!
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-18 3:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-12 22:20 [PATCHv2] ata: sata_mv: Use platform_get_irq() to get interrupt Rosen Penev
2026-07-18 3:01 ` Damien Le Moal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome