Re: [PATCH] ata: pata_pxa: use devm_platform_ioremap_resource

Damien Le Moal <[email protected]> Sat, 18 Jul 2026 12:04:42 +0900
Newsgroups org.kernel.vger.linux-ide,dev.linux.lists.llvm,org.kernel.vger.linux-kernel
Organization Western Digital Research
Message-ID <[email protected]>
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 <[email protected]>

Applied to for-7.3. Thanks!

-- 
Damien Le Moal
Western Digital Research