Re: [PATCH] ata: pata_pxa: use devm_platform_ioremap_resource
From: Damien Le Moal
Date: Fri Jul 17 2026 - 23:05:02 EST
On 7/15/26 10:13, Rosen Penev wrote:
> Replace the open-coded platform_get_resource() plus devm_ioremap()
> sequences for the CMD and CTL ports with devm_platform_ioremap_resource(),
> which fetches the resource, requests the region and maps it in one call.
> Switch the error checks to IS_ERR()/PTR_ERR() accordingly and drop the
> now-unused cmd_res and ctl_res variables.
>
> The DMA port keeps using devm_ioremap() as its resource is
> IORESOURCE_DMA. The CMD (res 0) and CTL (res 1) MEM resources are
> disjoint in the ATA task-file layout, so the added region reservation
> in devm_ioremap_resource() does not introduce overlap failures.
>
> Built for ARM (drivers/ata/pata_pxa.o) with LLVM=1.
>
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
Applied to for-7.3. Thanks!
--
Damien Le Moal
Western Digital Research