Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rust: pci: normalise spelling of PCI BAR

Consistently refer to PCI base address register as PCI BAR.
Fix spelling mistake "Mapps" -> "Maps".

Link: https://lore.kernel.org/rust-for-linux/20251015225827.GA960157@bhelgaas/
Link: https://github.com/Rust-for-Linux/linux/issues/1196
Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Peter Colberg <pcolberg@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Peter Colberg and committed by
Danilo Krummrich
26c1a20b c7f6d538

+6 -6
+2 -2
rust/kernel/pci.rs
··· 377 377 unsafe { (*self.as_raw()).subsystem_device } 378 378 } 379 379 380 - /// Returns the start of the given PCI bar resource. 380 + /// Returns the start of the given PCI BAR resource. 381 381 pub fn resource_start(&self, bar: u32) -> Result<bindings::resource_size_t> { 382 382 if !Bar::index_is_valid(bar) { 383 383 return Err(EINVAL); ··· 389 389 Ok(unsafe { bindings::pci_resource_start(self.as_raw(), bar.try_into()?) }) 390 390 } 391 391 392 - /// Returns the size of the given PCI bar resource. 392 + /// Returns the size of the given PCI BAR resource. 393 393 pub fn resource_len(&self, bar: u32) -> Result<bindings::resource_size_t> { 394 394 if !Bar::index_is_valid(bar) { 395 395 return Err(EINVAL);
+4 -4
rust/kernel/pci/io.rs
··· 18 18 /// # Invariants 19 19 /// 20 20 /// `Bar` always holds an `IoRaw` inststance that holds a valid pointer to the start of the I/O 21 - /// memory mapped PCI bar and its size. 21 + /// memory mapped PCI BAR and its size. 22 22 pub struct Bar<const SIZE: usize = 0> { 23 23 pdev: ARef<Device>, 24 24 io: IoRaw<SIZE>, ··· 78 78 79 79 /// # Safety 80 80 /// 81 - /// `ioptr` must be a valid pointer to the memory mapped PCI bar number `num`. 81 + /// `ioptr` must be a valid pointer to the memory mapped PCI BAR number `num`. 82 82 unsafe fn do_release(pdev: &Device, ioptr: usize, num: i32) { 83 83 // SAFETY: 84 84 // `pdev` is valid by the invariants of `Device`. ··· 120 120 } 121 121 122 122 impl Device<device::Bound> { 123 - /// Mapps an entire PCI-BAR after performing a region-request on it. I/O operation bound checks 123 + /// Maps an entire PCI BAR after performing a region-request on it. I/O operation bound checks 124 124 /// can be performed on compile time for offsets (plus the requested type size) < SIZE. 125 125 pub fn iomap_region_sized<'a, const SIZE: usize>( 126 126 &'a self, ··· 130 130 Devres::new(self.as_ref(), Bar::<SIZE>::new(self, bar, name)) 131 131 } 132 132 133 - /// Mapps an entire PCI-BAR after performing a region-request on it. 133 + /// Maps an entire PCI BAR after performing a region-request on it. 134 134 pub fn iomap_region<'a>( 135 135 &'a self, 136 136 bar: u32,