From: "Christian König" <christian.koenig@amd.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-pci@vger.kernel.org, "Bjorn Helgaas" <bhelgaas@google.com>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Michał Winiarski" <michal.winiarski@intel.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
amd-gfx@lists.freedesktop.org, "David Airlie" <airlied@gmail.com>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
?UTF-8?q?Thomas=20Hellstr=C3=B6m?=
<thomas.hellstrom@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH 04/11] PCI: Improve Resizable BAR functions kernel doc
Date: Thu, 11 Sep 2025 11:08:43 +0200 [thread overview]
Message-ID: <a07e33ac-85f8-4b5e-a700-032d7667cccd@amd.com> (raw)
In-Reply-To: <20c3a5f5-fa15-3889-3f56-20726aa3925b@linux.intel.com>
On 11.09.25 10:59, Ilpo Järvinen wrote:
> On Thu, 11 Sep 2025, Christian König wrote:
>
>> On 11.09.25 09:55, Ilpo Järvinen wrote:
>>> Fix the copy-pasted errors in the Resizable BAR handling functions
>>> kernel doc and generally improve wording choices.
>>>
>>> Fix the formatting errors of the Return: line.
>>>
>>> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>>> ---
>>> drivers/pci/rebar.c | 29 ++++++++++++++++++-----------
>>> 1 file changed, 18 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/drivers/pci/rebar.c b/drivers/pci/rebar.c
>>> index 020ed7a1b3aa..64315dd8b6bb 100644
>>> --- a/drivers/pci/rebar.c
>>> +++ b/drivers/pci/rebar.c
>>> @@ -58,8 +58,9 @@ void pci_rebar_init(struct pci_dev *pdev)
>>> * @bar: BAR to find
>>> *
>>> * Helper to find the position of the ctrl register for a BAR.
>>> - * Returns -ENOTSUPP if resizable BARs are not supported at all.
>>> - * Returns -ENOENT if no ctrl register for the BAR could be found.
>>> + *
>>> + * Return: %-ENOTSUPP if resizable BARs are not supported at all,
>>> + * %-ENOENT if no ctrl register for the BAR could be found.
>>> */
>>> static int pci_rebar_find_pos(struct pci_dev *pdev, int bar)
>>> {
>>> @@ -92,12 +93,15 @@ static int pci_rebar_find_pos(struct pci_dev *pdev, int bar)
>>> }
>>>
>>> /**
>>> - * pci_rebar_get_possible_sizes - get possible sizes for BAR
>>> + * pci_rebar_get_possible_sizes - get possible sizes for Resizable BAR
>>> * @pdev: PCI device
>>> * @bar: BAR to query
>>> *
>>> * Get the possible sizes of a resizable BAR as bitmask defined in the spec
>>> - * (bit 0=1MB, bit 31=128TB). Returns 0 if BAR isn't resizable.
>>> + * (bit 0=1MB, bit 31=128TB).
>>> + *
>>> + * Return: A bitmask of possible sizes (0=1MB, 31=128TB), or %0 if BAR isn't
>>> + * resizable.
>>> */
>>> u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
>>> {
>>> @@ -121,12 +125,14 @@ u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
>>> EXPORT_SYMBOL(pci_rebar_get_possible_sizes);
>>>
>>> /**
>>> - * pci_rebar_get_current_size - get the current size of a BAR
>>> + * pci_rebar_get_current_size - get the current size of a Resizable BAR
>>> * @pdev: PCI device
>>> - * @bar: BAR to set size to
>>> + * @bar: BAR to get the size from
>>> *
>>> - * Read the size of a BAR from the resizable BAR config.
>>> - * Returns size if found or negative error code.
>>> + * Reads the current size of a BAR from the Resizable BAR config.
>>> + *
>>> + * Return: BAR Size if @bar is resizable (bit 0=1MB, bit 31=128TB), or
>>
>> This is a bit misleading since there is no mask returned but rather the
>> order or in other words which bit of the mask was used.
>
> Thanks for noticing this. I'll removed "bit" x2 from it, does that fully
> address your concern?
That works for me, yes.
Regards,
Christian.
>
next prev parent reply other threads:[~2025-09-11 9:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 7:55 [PATCH 00/11] PCI: Resizable BAR improvements Ilpo Järvinen
2025-09-11 7:55 ` [PATCH 01/11] PCI: Move Resizable BAR code into rebar.c Ilpo Järvinen
2025-09-11 7:55 ` [PATCH 02/11] PCI: Cleanup pci_rebar_bytes_to_size() and move " Ilpo Järvinen
2025-09-11 17:25 ` Ruhl, Michael J
2025-09-11 7:55 ` [PATCH 03/11] PCI: Move pci_rebar_size_to_bytes() and export it Ilpo Järvinen
2025-09-11 7:55 ` [PATCH 04/11] PCI: Improve Resizable BAR functions kernel doc Ilpo Järvinen
2025-09-11 8:24 ` Christian König
2025-09-11 8:59 ` Ilpo Järvinen
2025-09-11 9:08 ` Christian König [this message]
2025-09-11 20:58 ` Randy Dunlap
2025-09-11 7:55 ` [PATCH 05/11] PCI: Add pci_rebar_size_supported() helper Ilpo Järvinen
2025-09-11 8:27 ` Christian König
2025-09-11 7:56 ` [PATCH 06/11] drm/i915/gt: Use pci_rebar_size_supported() Ilpo Järvinen
2025-09-11 7:56 ` [PATCH 07/11] drm/xe/vram: Use PCI rebar helpers in resize_vram_bar() Ilpo Järvinen
2025-09-11 7:56 ` [PATCH 08/11] PCI: Add pci_rebar_get_max_size() Ilpo Järvinen
2025-09-11 7:56 ` [PATCH 09/11] drm/xe/vram: Use pci_rebar_get_max_size() Ilpo Järvinen
2025-09-11 7:56 ` [PATCH 10/11] drm/amdgpu: " Ilpo Järvinen
2025-09-11 7:56 ` [PATCH 11/11] PCI: Convert BAR sizes bitmasks to u64 Ilpo Järvinen
2025-09-11 8:35 ` [PATCH 00/11] PCI: Resizable BAR improvements Christian König
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=a07e33ac-85f8-4b5e-a700-032d7667cccd@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bhelgaas@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kw@linux.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=michal.winiarski@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tursulin@ursulin.net \
/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