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: 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>

authored by

FUJITA Tomonori and committed by
Danilo Krummrich
8510ef5e 9f92d7d1

-1
-1
rust/kernel/device.rs
··· 14 14 15 15 #[cfg(CONFIG_PRINTK)] 16 16 use crate::c_str; 17 - use crate::str::CStrExt as _; 18 17 19 18 pub mod property; 20 19