]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
PCI: Remove pcim_iomap_regions_request_all()
authorPhilipp Stanner <pstanner@redhat.com>
Wed, 30 Oct 2024 11:27:43 +0000 (12:27 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 30 Oct 2024 21:07:39 +0000 (16:07 -0500)
pcim_iomap_regions_request_all() have been deprecated in
commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
pcim_iomap_regions_request_all()").

All users of this function have been ported to other interfaces by now.

Remove pcim_iomap_regions_request_all().

Link: https://lore.kernel.org/r/20241030112743.104395-11-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Documentation/driver-api/driver-model/devres.rst
drivers/pci/devres.c
include/linux/pci.h

index 5f2ee8d717b1deafb43a60b03dbc5d5bc6b4875a..3a30cf4f6c0d6e18d766221fbe15e1676057c000 100644 (file)
@@ -394,7 +394,6 @@ PCI
   pcim_enable_device()         : after success, some PCI ops become managed
   pcim_iomap()                 : do iomap() on a single BAR
   pcim_iomap_regions()         : do request_region() and iomap() on multiple BARs
-  pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs
   pcim_iomap_table()           : array of mapped addresses indexed by BAR
   pcim_iounmap()               : do iounmap() on a single BAR
   pcim_iounmap_regions()       : do iounmap() and release_region() on multiple BARs
index 2a64da5c91fb9bf088203ed6ead66851d849f221..319a477a2135b8583c6b73cb938d8d3ab178c1a8 100644 (file)
@@ -959,62 +959,6 @@ err:
 }
 EXPORT_SYMBOL(pcim_request_all_regions);
 
-/**
- * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones
- *                     (DEPRECATED)
- * @pdev: PCI device to map IO resources for
- * @mask: Mask of BARs to iomap
- * @name: Name associated with the requests
- *
- * Returns: 0 on success, negative error code on failure.
- *
- * Request all PCI BARs and iomap regions specified by @mask.
- *
- * To release these resources manually, call pcim_release_region() for the
- * regions and pcim_iounmap() for the mappings.
- *
- * This function is DEPRECATED. Don't use it in new code. Instead, use one
- * of the pcim_* region request functions in combination with a pcim_*
- * mapping function.
- */
-int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
-                                  const char *name)
-{
-       int bar;
-       int ret;
-       void __iomem **legacy_iomap_table;
-
-       ret = pcim_request_all_regions(pdev, name);
-       if (ret != 0)
-               return ret;
-
-       for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
-               if (!mask_contains_bar(mask, bar))
-                       continue;
-               if (!pcim_iomap(pdev, bar, 0))
-                       goto err;
-       }
-
-       return 0;
-
-err:
-       /*
-        * If bar is larger than 0, then pcim_iomap() above has most likely
-        * failed because of -EINVAL. If it is equal 0, most likely the table
-        * couldn't be created, indicating -ENOMEM.
-        */
-       ret = bar > 0 ? -EINVAL : -ENOMEM;
-       legacy_iomap_table = (void __iomem **)pcim_iomap_table(pdev);
-
-       while (--bar >= 0)
-               pcim_iounmap(pdev, legacy_iomap_table[bar]);
-
-       pcim_release_all_regions(pdev);
-
-       return ret;
-}
-EXPORT_SYMBOL(pcim_iomap_regions_request_all);
-
 /**
  * pcim_iounmap_regions - Unmap and release PCI BARs
  * @pdev: PCI device to map IO resources for
index 3b151c8331e590f8879ba8d50961a079fbe79251..b59197635c5c54b3d09c827fe5ebe1300888e3d1 100644 (file)
@@ -2301,8 +2301,6 @@ void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
 void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
 int pcim_request_region(struct pci_dev *pdev, int bar, const char *name);
 int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
-int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
-                                  const char *name);
 void pcim_iounmap_regions(struct pci_dev *pdev, int mask);
 void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar,
                                unsigned long offset, unsigned long len);