From: Philipp Stanner <pstanner@redhat.com>
To: Bjorn Helgaas <helgaas@kernel.org>
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: Wed, 04 Dec 2024 10:39:35 +0100 [thread overview]
Message-ID: <5852280fa2764f9ca17f95f66541a945ad5b37ae.camel@redhat.com> (raw)
In-Reply-To: <20241203213758.GA2966054@bhelgaas>
On Tue, 2024-12-03 at 15:37 -0600, Bjorn Helgaas wrote:
> 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.
>
Yup, sound like a good idea to me.
(nit: though I would say "name of the driver". But I'm also not a
native English speaker, so..)
P.
next prev parent reply other threads:[~2024-12-04 9:39 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
2024-12-04 9:39 ` Philipp Stanner [this message]
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=5852280fa2764f9ca17f95f66541a945ad5b37ae.camel@redhat.com \
--to=pstanner@redhat.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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.