From: Tamir Duberstein Date: Sat, 18 Oct 2025 19:16:33 +0000 (-0400) Subject: rust: configfs: use `CStr::as_char_ptr` X-Git-Tag: v6.19-rc1~175^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b46f65355c9627efd2dd8180c96b006a44d30f8;p=thirdparty%2Fkernel%2Flinux.git rust: configfs: use `CStr::as_char_ptr` Replace the use of `as_ptr` which works through `::deref()` in preparation for replacing `kernel::str::CStr` with `core::ffi::CStr` as the latter does not implement `Deref`. Signed-off-by: Tamir Duberstein Acked-by: Andreas Hindborg Link: https://patch.msgid.link/20251018-cstr-core-v18-12-9378a54385f8@gmail.com Signed-off-by: Miguel Ojeda --- diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs index 10f1547ca9f19..466fb7f407628 100644 --- a/rust/kernel/configfs.rs +++ b/rust/kernel/configfs.rs @@ -157,7 +157,7 @@ impl Subsystem { unsafe { bindings::config_group_init_type_name( &mut (*place.get()).su_group, - name.as_ptr(), + name.as_char_ptr(), item_type.as_ptr(), ) };