Re: [PATCH 2/2] PCI: Remove pcim_iounmap_regions()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/27/2025 7:07 PM, Philipp Stanner wrote:
> From: Philipp Stanner <pstanner@xxxxxxxxxx>
> 
> All users of the deprecated function pcim_iounmap_regions() have been
> ported by now. Remove it.
> 
> Signed-off-by: Philipp Stanner <pstanner@xxxxxxxxxx>
> ---
>  .../driver-api/driver-model/devres.rst        |  1 -
>  drivers/pci/devres.c                          | 24 -------------------
>  include/linux/pci.h                           |  1 -
>  3 files changed, 26 deletions(-)
> 
> diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
> index d75728eb05f8..601f1a74d34d 100644
> --- a/Documentation/driver-api/driver-model/devres.rst
> +++ b/Documentation/driver-api/driver-model/devres.rst
> @@ -396,7 +396,6 @@ PCI
>    pcim_iomap_regions()		: do request_region() 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
>    pcim_pin_device()		: keep PCI device enabled after release
>    pcim_set_mwi()		: enable Memory-Write-Invalidate PCI transaction
>  
> diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
> index 3431a7df3e0d..c60441555758 100644
> --- a/drivers/pci/devres.c
> +++ b/drivers/pci/devres.c
> @@ -946,30 +946,6 @@ int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
>  }
>  EXPORT_SYMBOL(pcim_request_all_regions);
>  
> -/**
> - * pcim_iounmap_regions - Unmap and release PCI BARs (DEPRECATED)
> - * @pdev: PCI device to map IO resources for
> - * @mask: Mask of BARs to unmap and release
> - *
> - * Unmap and release regions specified by @mask.
> - *
> - * This function is DEPRECATED. Do not use it in new code.
> - * Use pcim_iounmap_region() instead.
> - */
> -void pcim_iounmap_regions(struct pci_dev *pdev, int mask)
> -{
> -	int i;
> -
> -	for (i = 0; i < PCI_STD_NUM_BARS; i++) {
> -		if (!mask_contains_bar(mask, i))
> -			continue;
> -
> -		pcim_iounmap_region(pdev, i);
> -		pcim_remove_bar_from_legacy_table(pdev, i);
> -	}
> -}
> -EXPORT_SYMBOL(pcim_iounmap_regions);
> -
>  /**
>   * pcim_iomap_range - Create a ranged __iomap mapping within a PCI BAR
>   * @pdev: PCI device to map IO resources for
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 47b31ad724fa..7661f10913ca 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -2323,7 +2323,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);
> -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);
>  

Reviewed-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux