All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Philipp Stanner" <phasta@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI: Deprecate public devres reversal functions
Date: Tue, 01 Dec 2026 12:40:56 +0000	[thread overview]
Message-ID: <sashiko-outbox-243285@kernel.org> (raw)
In-Reply-To: <20261201122951.904104-3-phasta@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] PCI: pcim_iounmap_region() comment recommends nonexistent
  pci_iomap_region()
- [Low] PCI: pcim_iomap*() kernel-doc still recommends deprecated unmap
  helpers
--

commit eedf46bf67042e29b89e345ad6de41d2b256ef4c
Author: Philipp Stanner <phasta@kernel.org>

PCI: Deprecate public devres reversal functions

This commit marks the pcim_iounmap() and pcim_iounmap_region() manual
release functions as deprecated in their kernel-doc comments and directs
callers needing manual management to use unmanaged PCI helpers instead.

> diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
> index f075e7881c3a6..9a085fb18100a 100644
> --- a/drivers/pci/devres.c
> +++ b/drivers/pci/devres.c
> @@ -565,12 +565,16 @@ void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen)
>  EXPORT_SYMBOL(pcim_iomap);
>  
>  /**
> - * pcim_iounmap - Managed pci_iounmap()
> + * pcim_iounmap - Managed pci_iounmap() (DEPRECATED)
>   * @pdev: PCI device to iounmap for
>   * @addr: Address to unmap
>   *
>   * Managed pci_iounmap(). @addr must have been mapped using a pcim_* mapping
>   * function.
> + *
> + * This function is deprecated (at least for external users). If you're ever in
> + * a position where it seems useful, you should manage your IO-mappings fully
> + * manually, e.g., with pci_iomap().
>   */
>  void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr)
>  {

[Severity: Low]
Should the kernel-doc comments on pcim_iomap(), pcim_iomap_region(), and
pcim_iomap_range() also be updated now that pcim_iounmap() and
pcim_iounmap_region() are deprecated?  Those comments still tell callers
to manually unmap or release mappings using pcim_iounmap() and
pcim_iounmap_region().

> @@ -640,12 +644,16 @@ void __iomem *pcim_iomap_region(struct pci_dev *pdev, int bar,
>  EXPORT_SYMBOL(pcim_iomap_region);
>  
>  /**
> - * pcim_iounmap_region - Unmap and release a PCI BAR
> + * pcim_iounmap_region - Unmap and release a PCI BAR (DEPRECATED)
>   * @pdev: PCI device to operate on
>   * @bar: Index of BAR to unmap and release
>   *
>   * Unmap a BAR and release its region manually. Only pass BARs that were
>   * previously mapped by pcim_iomap_region().
> + *
> + * This function is deprecated (at least for external users). If you're ever in
> + * a position where it seems useful, you should manage your regions fully
> + * manually, e.g., with pci_iomap_region().
>   */
>  void pcim_iounmap_region(struct pci_dev *pdev, int bar)
>  {

[Severity: Low]
Should this comment recommend pci_request_region() and pci_iomap()
instead of pci_iomap_region()?  There is no unmanaged pci_iomap_region()
helper in the kernel.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201122951.904104-2-phasta@kernel.org?part=1

  reply	other threads:[~2026-12-01 12:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 12:29 [PATCH 0/3] PCI: Improve devres documentation Philipp Stanner
2026-12-01 12:29 ` [PATCH 1/3] PCI: Deprecate public devres reversal functions Philipp Stanner
2026-12-01 12:40   ` sashiko-bot [this message]
2026-12-01 12:29 ` [PATCH 2/3] PCI: Better document pcim_enable_device() Philipp Stanner
2026-12-01 12:29 ` [PATCH 3/3] PCI: Deprecate pcim_pin_device() Philipp Stanner
2026-12-01 12:40 ` [PATCH 0/3] PCI: Improve devres documentation sashiko-bot

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=sashiko-outbox-243285@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=phasta@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.