From: Bjorn Helgaas <helgaas@kernel.org>
To: Philipp Stanner <pstanner@redhat.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: Improve parameter docu for request APIs
Date: Tue, 3 Dec 2024 15:37:58 -0600 [thread overview]
Message-ID: <20241203213758.GA2966054@bhelgaas> (raw)
In-Reply-To: <20241203100023.31152-2-pstanner@redhat.com>
On Tue, Dec 03, 2024 at 11:00:24AM +0100, Philipp Stanner wrote:
> PCI region request functions have a @name parameter (sometimes called
> "res_name"). It is used in a log message to inform drivers about request
> collisions, i.e., when another driver has requested that region already.
>
> This message is only useful when it contains the actual owner of the
> region, i.e., which driver requested it. So far, a great many drivers
> misuse the @name parameter and just pass pci_name(), which doesn't
> result in useful debug information.
>
> Rename "res_name" to "name".
>
> Detail @name's purpose in the docstrings.
>
> Improve formatting a bit.
>
> Signed-off-by: Philipp Stanner <pstanner@redhat.com>
> ---
> drivers/pci/devres.c | 12 ++++----
> drivers/pci/pci.c | 69 +++++++++++++++++++++-----------------------
> 2 files changed, 39 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
> index 3b59a86a764b..ffaffa880b88 100644
> --- a/drivers/pci/devres.c
> +++ b/drivers/pci/devres.c
> @@ -101,7 +101,7 @@ static inline void pcim_addr_devres_clear(struct pcim_addr_devres *res)
> * @bar: BAR the range is within
> * @offset: offset from the BAR's start address
> * @maxlen: length in bytes, beginning at @offset
> - * @name: name associated with the request
> + * @name: name of the resource requestor
What if we say plainly:
@name: name of driver requesting the resource
I can tweak this locally if you agree.
next prev parent reply other threads:[~2024-12-03 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 10:00 [PATCH] PCI: Improve parameter docu for request APIs Philipp Stanner
2024-12-03 21:37 ` Bjorn Helgaas [this message]
2024-12-04 9:39 ` Philipp Stanner
2024-12-04 22:07 ` Bjorn Helgaas
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=20241203213758.GA2966054@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--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