[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86b8f2fc-ffe4-40f3-acf9-547e5a5a579d@de.bosch.com>
Date: Tue, 6 Jan 2026 10:27:17 +0100
From: Dirk Behme <dirk.behme@...bosch.com>
To: Marko Turk <mt@...koturk.info>, <dakr@...nel.org>,
<linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<rust-for-linux@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments
Am 1/5/2026 um 10:37 PM schrieb Marko Turk:
> Fix a typo in the doc-comment of the Bar structure: 'inststance ->
> instance'.
>
> Add also 'is' to the comment inside Bar's `new()` function (suggested
> by Dirk):
> // `pdev` is valid by the invariants of `Device`.
>
> Fixes: bf9651f84b4e ("rust: pci: implement I/O mappable `pci::Bar`")
> Suggested-by: Dirk Behme <dirk.behme@...bosch.com>
> Signed-off-by: Marko Turk <mt@...koturk.info>
Reviewed-by: Dirk Behme <dirk.behme@...bosch.com>
Same for patch 1/2.
Thanks!
Dirk
> ---
> Changes since v1:
> - updated commit msg
> - added Fixes: tag
> - fixed another typo as suggested by Dirk
>
> Link to v1: https://lore.kernel.org/lkml/20260103143119.96095-1-mt@markoturk.info/
>
> rust/kernel/pci/io.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs
> index 0d55c3139b6f..82a4f1eba2f5 100644
> --- a/rust/kernel/pci/io.rs
> +++ b/rust/kernel/pci/io.rs
> @@ -20,7 +20,7 @@
> ///
> /// # Invariants
> ///
> -/// `Bar` always holds an `IoRaw` inststance that holds a valid pointer to the start of the I/O
> +/// `Bar` always holds an `IoRaw` instance that holds a valid pointer to the start of the I/O
> /// memory mapped PCI BAR and its size.
> pub struct Bar<const SIZE: usize = 0> {
> pdev: ARef<Device>,
> @@ -54,7 +54,7 @@ pub(super) fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> {
> let ioptr: usize = unsafe { bindings::pci_iomap(pdev.as_raw(), num, 0) } as usize;
> if ioptr == 0 {
> // SAFETY:
> - // `pdev` valid by the invariants of `Device`.
> + // `pdev` is valid by the invariants of `Device`.
> // `num` is checked for validity by a previous call to `Device::resource_len`.
> unsafe { bindings::pci_release_region(pdev.as_raw(), num) };
> return Err(ENOMEM);
Powered by blists - more mailing lists