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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'driver-core-6.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core fixes from Danilo Krummrich:

- Fix swapped example values for the `family` and `machine` attributes
in the sysfs SoC bus ABI documentation

- Fix Rust build and intra-doc issues when optional subsystems
(CONFIG_PCI, CONFIG_AUXILIARY_BUS, CONFIG_PRINTK) are disabled

- Fix typos and incorrect safety comments in Rust PCI, DMA, and
device ID documentation

* tag 'driver-core-6.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
rust: device: Remove explicit import of CStrExt
rust: pci: fix typos in Bar struct's comments
rust: device: fix broken intra-doc links
rust: dma: fix broken intra-doc links
rust: driver: fix broken intra-doc links to example driver types
rust: device_id: replace incorrect word in safety documentation
rust: dma: remove incorrect safety documentation
docs: ABI: sysfs-devices-soc: Fix swapped sample values

+19 -17
+2 -2
Documentation/ABI/testing/sysfs-devices-soc
··· 17 17 contact: Lee Jones <lee@kernel.org> 18 18 Description: 19 19 Read-only attribute common to all SoCs. Contains the SoC machine 20 - name (e.g. Ux500). 20 + name (e.g. DB8500). 21 21 22 22 What: /sys/devices/socX/family 23 23 Date: January 2012 24 24 contact: Lee Jones <lee@kernel.org> 25 25 Description: 26 26 Read-only attribute common to all SoCs. Contains SoC family name 27 - (e.g. DB8500). 27 + (e.g. ux500). 28 28 29 29 On many of ARM based silicon with SMCCC v1.2+ compliant firmware 30 30 this will contain the JEDEC JEP106 manufacturer’s identification
+3 -4
rust/kernel/device.rs
··· 14 14 15 15 #[cfg(CONFIG_PRINTK)] 16 16 use crate::c_str; 17 - use crate::str::CStrExt as _; 18 17 19 18 pub mod property; 20 19 ··· 66 67 /// 67 68 /// # Implementing Bus Devices 68 69 /// 69 - /// This section provides a guideline to implement bus specific devices, such as [`pci::Device`] or 70 - /// [`platform::Device`]. 70 + /// This section provides a guideline to implement bus specific devices, such as: 71 + #[cfg_attr(CONFIG_PCI, doc = "* [`pci::Device`](kernel::pci::Device)")] 72 + /// * [`platform::Device`] 71 73 /// 72 74 /// A bus specific device should be defined as follows. 73 75 /// ··· 160 160 /// 161 161 /// [`AlwaysRefCounted`]: kernel::types::AlwaysRefCounted 162 162 /// [`impl_device_context_deref`]: kernel::impl_device_context_deref 163 - /// [`pci::Device`]: kernel::pci::Device 164 163 /// [`platform::Device`]: kernel::platform::Device 165 164 #[repr(transparent)] 166 165 pub struct Device<Ctx: DeviceContext = Normal>(Opaque<bindings::device>, PhantomData<Ctx>);
+1 -1
rust/kernel/device_id.rs
··· 15 15 /// # Safety 16 16 /// 17 17 /// Implementers must ensure that `Self` is layout-compatible with [`RawDeviceId::RawType`]; 18 - /// i.e. it's safe to transmute to `RawDeviceId`. 18 + /// i.e. it's safe to transmute to `RawType`. 19 19 /// 20 20 /// This requirement is needed so `IdArray::new` can convert `Self` to `RawType` when building 21 21 /// the ID table.
+3 -4
rust/kernel/dma.rs
··· 27 27 /// Trait to be implemented by DMA capable bus devices. 28 28 /// 29 29 /// The [`dma::Device`](Device) trait should be implemented by bus specific device representations, 30 - /// where the underlying bus is DMA capable, such as [`pci::Device`](::kernel::pci::Device) or 31 - /// [`platform::Device`](::kernel::platform::Device). 30 + /// where the underlying bus is DMA capable, such as: 31 + #[cfg_attr(CONFIG_PCI, doc = "* [`pci::Device`](kernel::pci::Device)")] 32 + /// * [`platform::Device`](::kernel::platform::Device) 32 33 pub trait Device: AsRef<device::Device<Core>> { 33 34 /// Set up the device's DMA streaming addressing capabilities. 34 35 /// ··· 533 532 /// 534 533 /// # Safety 535 534 /// 536 - /// * Callers must ensure that the device does not read/write to/from memory while the returned 537 - /// slice is live. 538 535 /// * Callers must ensure that this call does not race with a read or write to the same region 539 536 /// that overlaps with this write. 540 537 ///
+8 -4
rust/kernel/driver.rs
··· 33 33 //! } 34 34 //! ``` 35 35 //! 36 - //! For specific examples see [`auxiliary::Driver`], [`pci::Driver`] and [`platform::Driver`]. 36 + //! For specific examples see: 37 + //! 38 + //! * [`platform::Driver`](kernel::platform::Driver) 39 + #![cfg_attr( 40 + CONFIG_AUXILIARY_BUS, 41 + doc = "* [`auxiliary::Driver`](kernel::auxiliary::Driver)" 42 + )] 43 + #![cfg_attr(CONFIG_PCI, doc = "* [`pci::Driver`](kernel::pci::Driver)")] 37 44 //! 38 45 //! The `probe()` callback should return a `impl PinInit<Self, Error>`, i.e. the driver's private 39 46 //! data. The bus abstraction should store the pointer in the corresponding bus device. The generic ··· 86 79 //! 87 80 //! For this purpose the generic infrastructure in [`device_id`] should be used. 88 81 //! 89 - //! [`auxiliary::Driver`]: kernel::auxiliary::Driver 90 82 //! [`Core`]: device::Core 91 83 //! [`Device`]: device::Device 92 84 //! [`Device<Core>`]: device::Device<device::Core> ··· 93 87 //! [`DeviceContext`]: device::DeviceContext 94 88 //! [`device_id`]: kernel::device_id 95 89 //! [`module_driver`]: kernel::module_driver 96 - //! [`pci::Driver`]: kernel::pci::Driver 97 - //! [`platform::Driver`]: kernel::platform::Driver 98 90 99 91 use crate::error::{Error, Result}; 100 92 use crate::{acpi, device, of, str::CStr, try_pin_init, types::Opaque, ThisModule};
+2 -2
rust/kernel/pci/io.rs
··· 20 20 /// 21 21 /// # Invariants 22 22 /// 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 24 24 /// memory mapped PCI BAR and its size. 25 25 pub struct Bar<const SIZE: usize = 0> { 26 26 pdev: ARef<Device>, ··· 54 54 let ioptr: usize = unsafe { bindings::pci_iomap(pdev.as_raw(), num, 0) } as usize; 55 55 if ioptr == 0 { 56 56 // SAFETY: 57 - // `pdev` valid by the invariants of `Device`. 57 + // `pdev` is valid by the invariants of `Device`. 58 58 // `num` is checked for validity by a previous call to `Device::resource_len`. 59 59 unsafe { bindings::pci_release_region(pdev.as_raw(), num) }; 60 60 return Err(ENOMEM);