Re: [PATCH] ata: sata_highbank: use devm_platform_ioremap_resource

From: Damien Le Moal

Date: Fri Jul 17 2026 - 23:07:00 EST


On 7/15/26 10:14, Rosen Penev wrote:
> Replace the open-coded platform_get_resource() plus devm_ioremap()
> sequence with devm_platform_ioremap_resource(), which fetches the
> resource, requests the region and maps it in one call. Switch the error
> check to IS_ERR()/PTR_ERR() and drop the now-unused struct resource
> pointer.
>
> There is a single IORESOURCE_MEM resource, and the SATA PHY registers
> are mapped separately via of_iomap() from distinct DT nodes, so the
> region reservation added by devm_ioremap_resource() is exclusive and
> does not introduce overlap failures.
>
> The mem-based ata_port_desc() line is dropped along with the resource
> pointer; the remaining per-port description is retained.
>
> Built for ARM (drivers/ata/sata_highbank.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