1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00

rust: device: Remove explicit import of CStrExt

Remove the explicit import of CStrExt. When CONFIG_PRINTK is disabled
this import causes a build error:

error: unused import: `crate::str::CStrExt`
  --> rust/kernel/device.rs:17:5
   |
17 | use crate::str::CStrExt as _;
   |     ^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: aborting due to 1 previous error

CStrExt is covered by prelude::* so the explicit import is redundant.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Fixes: 3b83f5d5e78a ("rust: replace `CStr` with `core::ffi::CStr`")
Link: https://patch.msgid.link/20260106000320.2593800-1-fujita.tomonori@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
FUJITA Tomonori 2026-01-06 09:03:20 +09:00 committed by Danilo Krummrich
parent 9f92d7d1cb
commit 8510ef5e3c

View File

@ -14,7 +14,6 @@ use core::{any::TypeId, marker::PhantomData, ptr};
#[cfg(CONFIG_PRINTK)]
use crate::c_str;
use crate::str::CStrExt as _;
pub mod property;