Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Philipp Stanner <pstanner@redhat.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/2] PCI: Make pcim_request_all_regions() a public function
Date: Wed, 31 Jul 2024 15:02:07 -0500	[thread overview]
Message-ID: <20240731200207.GA78649@bhelgaas> (raw)
In-Reply-To: <20240731123454.22780-2-pstanner@redhat.com>

On Wed, Jul 31, 2024 at 02:34:54PM +0200, Philipp Stanner wrote:
> In order to remove the deprecated function
> pcim_iomap_regions_request_all(), a few drivers need an interface to
> request all BARs a PCI-Device offers.
> 
> Make pcim_request_all_regions() a public interface.

pcim_iomap_regions_request_all() is only used by a dozen or so
drivers.  Can we convert them all at once to consolidate reviewing
them?  Or are the others harder so we have to do this piece-meal?

> Signed-off-by: Philipp Stanner <pstanner@redhat.com>
> ---
>  drivers/pci/devres.c | 3 ++-
>  include/linux/pci.h  | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
> index 3780a9f9ec00..0ec2b23e6cac 100644
> --- a/drivers/pci/devres.c
> +++ b/drivers/pci/devres.c
> @@ -932,7 +932,7 @@ static void pcim_release_all_regions(struct pci_dev *pdev)
>   * desired, release individual regions with pcim_release_region() or all of
>   * them at once with pcim_release_all_regions().
>   */
> -static int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
> +int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
>  {
>  	int ret;
>  	int bar;
> @@ -950,6 +950,7 @@ static int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
>  
>  	return ret;
>  }
> +EXPORT_SYMBOL(pcim_request_all_regions);
>  
>  /**
>   * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 4cf89a4b4cbc..5b5856ba63e1 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -2289,6 +2289,7 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass,
>  				    struct pci_dev *dev) { }
>  #endif
>  
> +int pcim_request_all_regions(struct pci_dev *pdev, const char *name);
>  void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
>  void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
>  void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
> -- 
> 2.45.2
> 

      parent reply	other threads:[~2024-07-31 20:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 12:34 [PATCH 1/2] PCI: Make pcim_request_all_regions() a public function Philipp Stanner
2024-07-31 12:34 ` [PATCH 2/2] ata: ahci: Remove deprecated PCI functions Philipp Stanner
2024-07-31 20:02 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240731200207.GA78649@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=pstanner@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox