Skip to contentSkip to conversation

rust: list: remove nonexistent generic parameter in link

PATCH Applied Miguel Ojeda 3 participants 3 messages Jul 19, 2025 – Jul 20, 2025 Rust

lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 rust: list: remove nonexistent generic parameter in link

ListLinks does not take a T generic parameter, unlike ListLinksSelfPtr.

Thus fix it, which makes it also consistent with the rest of the links in the file.

Fixes 40c53294596b ("rust: list: add macro for implementing ListItem")
---
 rust/kernel/list/impl_list_item_mod.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/list/impl_list_item_mod.rs +2 -2
index f4c91832a875..202bc6f97c13 100644
@@ -17,13 +17,13 @@
 /// [`ListLinks<ID>`]: crate::list::ListLinks
 /// [`ListItem`]: crate::list::ListItem
 pub unsafe trait HasListLinks<const ID: u64 = 0> {
-    /// Returns a pointer to the [`ListLinks<T, ID>`] field.
+    /// Returns a pointer to the [`ListLinks<ID>`] field.
     ///
     /// # Safety
     ///
     /// The provided pointer must point at a valid struct of type `Self`.
     ///
-    /// [`ListLinks<T, ID>`]: crate::list::ListLinks
+    /// [`ListLinks<ID>`]: crate::list::ListLinks
     unsafe fn raw_get_list_links(ptr: *mut Self) -> *mut crate::list::ListLinks<ID>;
 }
 

base-commit: cc84ef3b88f407e8bd5a5f7b6906d1e69851c856

Signature · 1 line
2.50.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Miguel Ojeda

ListLinks does not take a T generic parameter, unlike ListLinksSelfPtr.

Thus fix it, which makes it also consistent with the rest of the links in the file.

Fixes 40c53294596b ("rust: list: add macro for implementing ListItem")
Quoted 30 lines
---
 rust/kernel/list/impl_list_item_mod.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/list/impl_list_item_mod.rs +2 -2
index f4c91832a875..202bc6f97c13 100644
@@ -17,13 +17,13 @@
 /// [`ListLinks<ID>`]: crate::list::ListLinks
 /// [`ListItem`]: crate::list::ListItem
 pub unsafe trait HasListLinks<const ID: u64 = 0> {
-    /// Returns a pointer to the [`ListLinks<T, ID>`] field.
+    /// Returns a pointer to the [`ListLinks<ID>`] field.
     ///
     /// # Safety
     ///
     /// The provided pointer must point at a valid struct of type `Self`.
     ///
-    /// [`ListLinks<T, ID>`]: crate::list::ListLinks
+    /// [`ListLinks<ID>`]: crate::list::ListLinks
     unsafe fn raw_get_list_links(ptr: *mut Self) -> *mut crate::list::ListLinks<ID>;
 }
 

base-commit: cc84ef3b88f407e8bd5a5f7b6906d1e69851c856 --
2.50.1

Applied
#2 lore raw
In reply to Miguel Ojeda
Quoted 9 lines · Miguel Ojeda

ListLinks does not take a T generic parameter, unlike ListLinksSelfPtr.

Thus fix it, which makes it also consistent with the rest of the links in the file.

Fixes 40c53294596b ("rust: list: add macro for implementing ListItem")

Applied to rust-next -- thanks!

Cheers,
Miguel