[PATCH v2] stmmac: Replace deprecated PCI functions

Andrew Lunn andrew at lunn.ch
Tue Feb 18 08:13:30 PST 2025


On Tue, Feb 18, 2025 at 02:21:21PM +0100, Philipp Stanner wrote:
> From: Philipp Stanner <pstanner at redhat.com>
> 
> The PCI functions
>   - pcim_iomap_regions()
>   - pcim_iomap_table() and
>   - pcim_iounmap_regions()
> have been deprecated.
> 
> The usage of pcim_* cleanup functions in the driver detach path (remove
> callback) is actually not necessary, since they perform that cleanup
> automatically.
> 
> Furthermore, loongson_dwmac_probe() contains a surplus loop. That loop
> does not use index i in pcim_iomap_regions(), but costantly attempts to
> request and ioremap BAR 0. This would actually fail (since you cannot
> request the same BAR more than once), but presumably never fails because
> the preceding length check detects that all BARs except for 0 do not
> exist.

Thanks for the extended commit message.

It would be nice if the loongson Maintainers comment about the removal
of the loop. I will leave it a couple of days before adding a
Reviewed-by.

	Andrew



More information about the linux-arm-kernel mailing list