Re: [PATCH 02/31] ASoC: intel/avs: Use pure devres PCI
From: Andy Shevchenko
Date: Wed Apr 16 2025 - 11:39:33 EST
On Wed, Apr 16, 2025 at 03:12:12PM +0200, Philipp Stanner wrote:
> pci_request_regions() is a hybrid function which becomes managed if
> pcim_enable_device() was called before. This hybrid nature is deprecated
> and should not be used anymore.
>
> Replace pci_request_regions() with the always-managed function
> pcim_request_all_regions().
>
> Remove the goto jump to pci_release_regions(), since pcim_ functions
> clean up automatically.
...
> bus->remap_addr = pci_ioremap_bar(pci, 0);
> if (!bus->remap_addr) {
> dev_err(bus->dev, "ioremap error\n");
> - ret = -ENXIO;
> - goto err_remap_bar0;
> + return -ENXIO;
Here and everywhere else these can now be converted to dev_err_probe().
Are you planning to do so?
...
> err_remap_bar4:
> iounmap(bus->remap_addr);
This looks weird if the driver already is using pcim_enable_device().
Doesn't this look to you as an existing bug?
> -err_remap_bar0:
> - pci_release_regions(pci);
> return ret;
--
With Best Regards,
Andy Shevchenko