From: Greg Kroah-Hartman Date: Mon, 16 Feb 2026 09:45:12 +0000 (+0100) Subject: 6.18-stable patches X-Git-Tag: v6.6.126~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e5b3a9bde8a2b60ffbcd6916468e6921667e6b6;p=thirdparty%2Fkernel%2Fstable-queue.git 6.18-stable patches added patches: rust-device-fix-broken-intra-doc-links.patch rust-dma-fix-broken-intra-doc-links.patch rust-driver-fix-broken-intra-doc-links-to-example-driver-types.patch --- diff --git a/queue-6.18/rust-device-fix-broken-intra-doc-links.patch b/queue-6.18/rust-device-fix-broken-intra-doc-links.patch new file mode 100644 index 0000000000..3c0e36fa95 --- /dev/null +++ b/queue-6.18/rust-device-fix-broken-intra-doc-links.patch @@ -0,0 +1,56 @@ +From a9a42f0754b6c69525612d678b73da790e28b9fd Mon Sep 17 00:00:00 2001 +From: FUJITA Tomonori +Date: Wed, 31 Dec 2025 13:57:28 +0900 +Subject: rust: device: fix broken intra-doc links + +From: FUJITA Tomonori + +commit a9a42f0754b6c69525612d678b73da790e28b9fd upstream. + +The `pci` module is conditional on CONFIG_PCI. When it's disabled, the +intra-doc link to `pci::Device` causes rustdoc warnings: + +warning: unresolved link to `kernel::pci::Device` + --> rust/kernel/device.rs:163:22 + | +163 | /// [`pci::Device`]: kernel::pci::Device + | ^^^^^^^^^^^^^^^^^^^ no item named `pci` in module `kernel` + | + = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default + +Fix this by making the documentation conditional on CONFIG_PCI. + +Fixes: d6e26c1ae4a6 ("device: rust: expand documentation for Device") +Signed-off-by: FUJITA Tomonori +Reviewed-by: Dirk Behme +Link: https://patch.msgid.link/20251231045728.1912024-2-fujita.tomonori@gmail.com +[ Keep the "such as" part indicating a list of examples; fix typos in + commit message. - Danilo ] +Signed-off-by: Danilo Krummrich +Signed-off-by: Greg Kroah-Hartman +--- + rust/kernel/device.rs | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/rust/kernel/device.rs ++++ b/rust/kernel/device.rs +@@ -62,8 +62,9 @@ pub mod property; + /// + /// # Implementing Bus Devices + /// +-/// This section provides a guideline to implement bus specific devices, such as [`pci::Device`] or +-/// [`platform::Device`]. ++/// This section provides a guideline to implement bus specific devices, such as: ++#[cfg_attr(CONFIG_PCI, doc = "* [`pci::Device`](kernel::pci::Device)")] ++/// * [`platform::Device`] + /// + /// A bus specific device should be defined as follows. + /// +@@ -155,7 +156,6 @@ pub mod property; + /// + /// [`AlwaysRefCounted`]: kernel::types::AlwaysRefCounted + /// [`impl_device_context_deref`]: kernel::impl_device_context_deref +-/// [`pci::Device`]: kernel::pci::Device + /// [`platform::Device`]: kernel::platform::Device + #[repr(transparent)] + pub struct Device(Opaque, PhantomData); diff --git a/queue-6.18/rust-dma-fix-broken-intra-doc-links.patch b/queue-6.18/rust-dma-fix-broken-intra-doc-links.patch new file mode 100644 index 0000000000..fbf82f14df --- /dev/null +++ b/queue-6.18/rust-dma-fix-broken-intra-doc-links.patch @@ -0,0 +1,46 @@ +From 32cb3840386fd3684fbe8294cfc0a6684417139e Mon Sep 17 00:00:00 2001 +From: FUJITA Tomonori +Date: Wed, 31 Dec 2025 13:57:27 +0900 +Subject: rust: dma: fix broken intra-doc links + +From: FUJITA Tomonori + +commit 32cb3840386fd3684fbe8294cfc0a6684417139e upstream. + +The `pci` module is conditional on CONFIG_PCI. When it's disabled, the +intra-doc link to `pci::Device` causes rustdoc warnings: + +warning: unresolved link to `::kernel::pci::Device` + --> rust/kernel/dma.rs:30:70 + | +30 | /// where the underlying bus is DMA capable, such as [`pci::Device`](::kernel::pci::Device) or + | ^^^^^^^^^^^^^^^^^^^^^ no item named `pci` in module `kernel` + +Fix this by making the documentation conditional on CONFIG_PCI. + +Fixes: d06d5f66f549 ("rust: dma: implement `dma::Device` trait") +Signed-off-by: FUJITA Tomonori +Reviewed-by: Dirk Behme +Link: https://patch.msgid.link/20251231045728.1912024-1-fujita.tomonori@gmail.com +[ Keep the "such as" part indicating a list of examples; fix typos in + commit message. - Danilo ] +Signed-off-by: Danilo Krummrich +Signed-off-by: Greg Kroah-Hartman +--- + rust/kernel/dma.rs | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/rust/kernel/dma.rs ++++ b/rust/kernel/dma.rs +@@ -26,8 +26,9 @@ pub type DmaAddress = bindings::dma_addr + /// Trait to be implemented by DMA capable bus devices. + /// + /// The [`dma::Device`](Device) trait should be implemented by bus specific device representations, +-/// where the underlying bus is DMA capable, such as [`pci::Device`](::kernel::pci::Device) or +-/// [`platform::Device`](::kernel::platform::Device). ++/// where the underlying bus is DMA capable, such as: ++#[cfg_attr(CONFIG_PCI, doc = "* [`pci::Device`](kernel::pci::Device)")] ++/// * [`platform::Device`](::kernel::platform::Device) + pub trait Device: AsRef> { + /// Set up the device's DMA streaming addressing capabilities. + /// diff --git a/queue-6.18/rust-driver-fix-broken-intra-doc-links-to-example-driver-types.patch b/queue-6.18/rust-driver-fix-broken-intra-doc-links-to-example-driver-types.patch new file mode 100644 index 0000000000..008b6dde17 --- /dev/null +++ b/queue-6.18/rust-driver-fix-broken-intra-doc-links-to-example-driver-types.patch @@ -0,0 +1,69 @@ +From 4c9f6a782f6078dc94450fcb22e65d520bfa0775 Mon Sep 17 00:00:00 2001 +From: Alice Ryhl +Date: Sat, 27 Dec 2025 15:47:21 +0000 +Subject: rust: driver: fix broken intra-doc links to example driver types + +From: Alice Ryhl + +commit 4c9f6a782f6078dc94450fcb22e65d520bfa0775 upstream. + +The `auxiliary` and `pci` modules are conditional on +`CONFIG_AUXILIARY_BUS` and `CONFIG_PCI` respectively. When these are +disabled, the intra-doc links to `auxiliary::Driver` and `pci::Driver` +break, causing rustdoc warnings (or errors with `-D warnings`). + +error: unresolved link to `kernel::auxiliary::Driver` + --> rust/kernel/driver.rs:82:28 + | +82 | //! [`auxiliary::Driver`]: kernel::auxiliary::Driver + | ^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `auxiliary` in module `kernel` + +Fix this by making the documentation for these examples conditional on +the corresponding configuration options. + +Fixes: 970a7c68788e ("driver: rust: expand documentation for driver infrastructure") +Signed-off-by: Alice Ryhl +Reported-by: FUJITA Tomonori +Closes: https://lore.kernel.org/rust-for-linux/20251209.151817.744108529426448097.fujita.tomonori@gmail.com/ +Link: https://patch.msgid.link/20251227-driver-types-v1-1-1916154fbe5e@google.com +Signed-off-by: Danilo Krummrich +Signed-off-by: Greg Kroah-Hartman +--- + rust/kernel/driver.rs | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/rust/kernel/driver.rs ++++ b/rust/kernel/driver.rs +@@ -33,7 +33,14 @@ + //! } + //! ``` + //! +-//! For specific examples see [`auxiliary::Driver`], [`pci::Driver`] and [`platform::Driver`]. ++//! For specific examples see: ++//! ++//! * [`platform::Driver`](kernel::platform::Driver) ++#![cfg_attr( ++ CONFIG_AUXILIARY_BUS, ++ doc = "* [`auxiliary::Driver`](kernel::auxiliary::Driver)" ++)] ++#![cfg_attr(CONFIG_PCI, doc = "* [`pci::Driver`](kernel::pci::Driver)")] + //! + //! The `probe()` callback should return a `Result>>`, i.e. the driver's private + //! data. The bus abstraction should store the pointer in the corresponding bus device. The generic +@@ -79,7 +86,6 @@ + //! + //! For this purpose the generic infrastructure in [`device_id`] should be used. + //! +-//! [`auxiliary::Driver`]: kernel::auxiliary::Driver + //! [`Core`]: device::Core + //! [`Device`]: device::Device + //! [`Device`]: device::Device +@@ -87,8 +93,6 @@ + //! [`DeviceContext`]: device::DeviceContext + //! [`device_id`]: kernel::device_id + //! [`module_driver`]: kernel::module_driver +-//! [`pci::Driver`]: kernel::pci::Driver +-//! [`platform::Driver`]: kernel::platform::Driver + + use crate::error::{Error, Result}; + use crate::{acpi, device, of, str::CStr, try_pin_init, types::Opaque, ThisModule}; diff --git a/queue-6.18/series b/queue-6.18/series index 40eb4524d6..1c2c0df05a 100644 --- a/queue-6.18/series +++ b/queue-6.18/series @@ -1 +1,4 @@ scsi-qla2xxx-fix-bsg_done-causing-double-free.patch +rust-device-fix-broken-intra-doc-links.patch +rust-dma-fix-broken-intra-doc-links.patch +rust-driver-fix-broken-intra-doc-links-to-example-driver-types.patch