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

drm/panic: use `core::ffi::CStr` method names

Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoid methods that only exist on the latter.

Link: https://github.com/Rust-for-Linux/linux/issues/1075
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Acked-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Tamir Duberstein and committed by
Miguel Ojeda
7dfabaa0 eb985995

+1 -1
+1 -1
drivers/gpu/drm/drm_panic_qr.rs
··· 968 968 // nul-terminated string. 969 969 let url_cstr: &CStr = unsafe { CStr::from_char_ptr(url) }; 970 970 let segments = &[ 971 - &Segment::Binary(url_cstr.as_bytes()), 971 + &Segment::Binary(url_cstr.to_bytes()), 972 972 &Segment::Numeric(&data_slice[0..data_len]), 973 973 ]; 974 974 match EncodedMsg::new(segments, tmp_slice) {