Skip to content

Commit 9f92d7d

Browse files
Marko TurkDanilo Krummrich
authored andcommitted
rust: pci: fix typos in Bar struct's comments
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: bf9651f ("rust: pci: implement I/O mappable `pci::Bar`") Suggested-by: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: Marko Turk <mt@markoturk.info> Reviewed-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://patch.msgid.link/20260105213726.73000-2-mt@markoturk.info Signed-off-by: Danilo Krummrich <dakr@kernel.org>
1 parent a9a42f0 commit 9f92d7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rust/kernel/pci/io.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use core::ops::Deref;
2020
///
2121
/// # Invariants
2222
///
23-
/// `Bar` always holds an `IoRaw` inststance that holds a valid pointer to the start of the I/O
23+
/// `Bar` always holds an `IoRaw` instance that holds a valid pointer to the start of the I/O
2424
/// memory mapped PCI BAR and its size.
2525
pub struct Bar<const SIZE: usize = 0> {
2626
pdev: ARef<Device>,
@@ -54,7 +54,7 @@ impl<const SIZE: usize> Bar<SIZE> {
5454
let ioptr: usize = unsafe { bindings::pci_iomap(pdev.as_raw(), num, 0) } as usize;
5555
if ioptr == 0 {
5656
// SAFETY:
57-
// `pdev` valid by the invariants of `Device`.
57+
// `pdev` is valid by the invariants of `Device`.
5858
// `num` is checked for validity by a previous call to `Device::resource_len`.
5959
unsafe { bindings::pci_release_region(pdev.as_raw(), num) };
6060
return Err(ENOMEM);

0 commit comments

Comments
 (0)