Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: configfs: use `CStr::as_char_ptr`

Replace the use of `as_ptr` which works through `<CStr as
Deref<Target=&[u8]>::deref()` in preparation for replacing
`kernel::str::CStr` with `core::ffi::CStr` as the latter does not
implement `Deref<Target=&[u8]>`.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://patch.msgid.link/20251018-cstr-core-v18-12-9378a54385f8@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Tamir Duberstein and committed by
Miguel Ojeda
3b46f653 965a39a9

+1 -1
+1 -1
rust/kernel/configfs.rs
··· 157 157 unsafe { 158 158 bindings::config_group_init_type_name( 159 159 &mut (*place.get()).su_group, 160 - name.as_ptr(), 160 + name.as_char_ptr(), 161 161 item_type.as_ptr(), 162 162 ) 163 163 };