rust: list: undo unintended replacement of method name
authorMiguel Ojeda <ojeda@kernel.org>
Sat, 19 Jul 2025 18:36:49 +0000 (20:36 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Sat, 19 Jul 2025 21:18:16 +0000 (23:18 +0200)
When we renamed `Opaque::raw_get` to `cast_into`, there was one
replacement that was not supposed to be there.

It does not cause an issue so far because it is inside a macro rule (the
`ListLinksSelfPtr` one) that is unused so far. However, it will start
to be used soon.

Thus fix it now.

Fixes: 64fb810bce03 ("rust: types: rename Opaque::raw_get to cast_into")
Reviewed-by: Tamir Duberstein <tamird@gmail.com>
Link: https://lore.kernel.org/r/20250719183649.596051-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/list/impl_list_item_mod.rs

index c1edba0a950167ce755c61cecc54f768e99ae511..3f6c30e14904f75160ba2def5cdfc55bc2a24de7 100644 (file)
@@ -252,7 +252,7 @@ macro_rules! impl_list_item {
                 // the pointer stays in bounds of the allocation.
                 let self_ptr = unsafe { (links_field as *const u8).add(spoff) }
                     as *const ::core::cell::UnsafeCell<*const Self>;
-                let cell_inner = ::core::cell::UnsafeCell::cast_into(self_ptr);
+                let cell_inner = ::core::cell::UnsafeCell::raw_get(self_ptr);
                 // SAFETY: This is not a data race, because the only function that writes to this
                 // value is `prepare_to_insert`, but by the safety requirements the
                 // `prepare_to_insert` method may not be called in parallel with `view_value` or