summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_panic_qr.rs
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2025-08-13 11:41:52 -0400
committerMiguel Ojeda <ojeda@kernel.org>2025-09-16 09:26:59 +0200
commit7dfabaa0c489ce65883c26ba5cdb15169f168d7a (patch)
tree6a9c0981e24206d647d561d78a6ee58c541fead8 /drivers/gpu/drm/drm_panic_qr.rs
parenteb98599528ebee9b660d98ae6613c2f2966e0dbb (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/drm_panic_qr.rs')
-rw-r--r--drivers/gpu/drm/drm_panic_qr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs
index 50c286c5cee8..ac27e86c601c 100644
--- a/drivers/gpu/drm/drm_panic_qr.rs
+++ b/drivers/gpu/drm/drm_panic_qr.rs
@@ -968,7 +968,7 @@ pub unsafe extern "C" fn drm_panic_qr_generate(
// nul-terminated string.
let url_cstr: &CStr = unsafe { CStr::from_char_ptr(url) };
let segments = &[
- &Segment::Binary(url_cstr.as_bytes()),
+ &Segment::Binary(url_cstr.to_bytes()),
&Segment::Numeric(&data_slice[0..data_len]),
];
match EncodedMsg::new(segments, tmp_slice) {