Skip to content

Commit 9e626ed

Browse files
tamirdojeda
authored andcommitted
rust: list: use consistent self parameter name
Refer to the self parameter of `impl_list_item!` by the same name used in `impl_has_list_links{,_self_ptr}!`. Reviewed-by: Christian Schrefl <chrisi.schrefl@gmail.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Tamir Duberstein <tamird@gmail.com> Link: https://lore.kernel.org/r/20250709-list-no-offset-v4-3-a429e75840a9@gmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 9cec86e commit 9e626ed

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

rust/kernel/list/impl_list_item_mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ pub use impl_has_list_links_self_ptr;
114114
#[macro_export]
115115
macro_rules! impl_list_item {
116116
(
117-
$(impl$({$($generics:tt)*})? ListItem<$num:tt> for $t:ty {
117+
$(impl$({$($generics:tt)*})? ListItem<$num:tt> for $self:ty {
118118
using ListLinks;
119119
})*
120120
) => {$(
121121
// SAFETY: See GUARANTEES comment on each method.
122-
unsafe impl$(<$($generics)*>)? $crate::list::ListItem<$num> for $t {
122+
unsafe impl$(<$($generics)*>)? $crate::list::ListItem<$num> for $self {
123123
// GUARANTEES:
124124
// * This returns the same pointer as `prepare_to_insert` because `prepare_to_insert`
125125
// is implemented in terms of `view_links`.
@@ -178,12 +178,12 @@ macro_rules! impl_list_item {
178178
)*};
179179

180180
(
181-
$(impl$({$($generics:tt)*})? ListItem<$num:tt> for $t:ty {
181+
$(impl$({$($generics:tt)*})? ListItem<$num:tt> for $self:ty {
182182
using ListLinksSelfPtr;
183183
})*
184184
) => {$(
185185
// SAFETY: See GUARANTEES comment on each method.
186-
unsafe impl$(<$($generics)*>)? $crate::list::ListItem<$num> for $t {
186+
unsafe impl$(<$($generics)*>)? $crate::list::ListItem<$num> for $self {
187187
// GUARANTEES:
188188
// This implementation of `ListItem` will not give out exclusive access to the same
189189
// `ListLinks` several times because calls to `prepare_to_insert` and `post_remove`

0 commit comments

Comments
 (0)