Thread (19 messages) 19 messages, 4 authors, 2024-08-21

Re: [PATCH v2 2/9] fpga/dfl-pci.c: Replace deprecated PCI functions

From: Andy Shevchenko <hidden>
Date: 2024-08-21 08:23:00
Also in: linux-arm-kernel, linux-block, linux-doc, linux-fpga, linux-gpio, linux-pci, lkml, virtualization

On Wed, Aug 21, 2024 at 10:19 AM Philipp Stanner [off-list ref] wrote:
pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the
PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate
pcim_iomap_table(), pcim_iomap_regions_request_all()").

Port dfl-pci.c to the successor, pcim_iomap_region().

Consistently, replace pcim_iounmap_regions() with pcim_iounmap_region().
 static void __iomem *cci_pci_ioremap_bar0(struct pci_dev *pcidev)
 {
-       if (pcim_iomap_regions(pcidev, BIT(0), DRV_NAME))
+       void __iomem *bar0;
+
+       bar0 = pcim_iomap_region(pcidev, 0, DRV_NAME);
+       if (IS_ERR(bar0))
                return NULL;

-       return pcim_iomap_table(pcidev)[0];
+       return bar0;
 }
Now this becomes an unneeded wrapper on pcim_ioremap_region(). Can we
kill this helper completely?

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help