* [PATCH] rust: list: remove nonexistent generic parameter in link
@ 2025-07-19 23:25 Miguel Ojeda
2025-07-20 15:01 ` Tamir Duberstein
2025-07-20 20:13 ` Miguel Ojeda
0 siblings, 2 replies; 3+ messages in thread
From: Miguel Ojeda @ 2025-07-19 23:25 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
rust-for-linux, linux-kernel, patches
`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")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
rust/kernel/list/impl_list_item_mod.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/list/impl_list_item_mod.rs b/rust/kernel/list/impl_list_item_mod.rs
index f4c91832a875..202bc6f97c13 100644
--- a/rust/kernel/list/impl_list_item_mod.rs
+++ b/rust/kernel/list/impl_list_item_mod.rs
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rust: list: remove nonexistent generic parameter in link
2025-07-19 23:25 [PATCH] rust: list: remove nonexistent generic parameter in link Miguel Ojeda
@ 2025-07-20 15:01 ` Tamir Duberstein
2025-07-20 20:13 ` Miguel Ojeda
1 sibling, 0 replies; 3+ messages in thread
From: Tamir Duberstein @ 2025-07-20 15:01 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, rust-for-linux, linux-kernel, patches
On Sat, Jul 19, 2025 at 7:25 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> `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")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Tamir Duberstein <tamird@gmail.com>
> ---
> rust/kernel/list/impl_list_item_mod.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rust/kernel/list/impl_list_item_mod.rs b/rust/kernel/list/impl_list_item_mod.rs
> index f4c91832a875..202bc6f97c13 100644
> --- a/rust/kernel/list/impl_list_item_mod.rs
> +++ b/rust/kernel/list/impl_list_item_mod.rs
> @@ -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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rust: list: remove nonexistent generic parameter in link
2025-07-19 23:25 [PATCH] rust: list: remove nonexistent generic parameter in link Miguel Ojeda
2025-07-20 15:01 ` Tamir Duberstein
@ 2025-07-20 20:13 ` Miguel Ojeda
1 sibling, 0 replies; 3+ messages in thread
From: Miguel Ojeda @ 2025-07-20 20:13 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, rust-for-linux, linux-kernel, patches
On Sun, Jul 20, 2025 at 1:25 AM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> `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")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Applied to `rust-next` -- thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-20 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-19 23:25 [PATCH] rust: list: remove nonexistent generic parameter in link Miguel Ojeda
2025-07-20 15:01 ` Tamir Duberstein
2025-07-20 20:13 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).