rust: kernel: remove redundant imports
Rust's `unused_imports` lint covers both unused and redundant imports. In the upcoming 1.78.0, the lint detects more cases of redundant imports [1], e.g.: error: the item `bindings` is imported redundantly --> rust/kernel/print.rs:38:9 | 38 | use crate::bindings; | ^^^^^^^^^^^^^^^ the item `bindings` is already defined by prelude Most cases are `use crate::bindings`, plus a few other items like `Box`. Thus clean them up. Note that, in the `bindings` case, the message "defined by prelude" above means the extern prelude, i.e. the `--extern` flags we pass. Link: https://github.com/rust-lang/rust/pull/117772 [1] Reviewed-by:Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240401212303.537355-3-ojeda@kernel.org Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
Showing
- rust/kernel/alloc.rs 0 additions, 1 deletionrust/kernel/alloc.rs
- rust/kernel/alloc/allocator.rs 0 additions, 2 deletionsrust/kernel/alloc/allocator.rs
- rust/kernel/alloc/box_ext.rs 0 additions, 1 deletionrust/kernel/alloc/box_ext.rs
- rust/kernel/alloc/vec_ext.rs 0 additions, 1 deletionrust/kernel/alloc/vec_ext.rs
- rust/kernel/error.rs 0 additions, 1 deletionrust/kernel/error.rs
- rust/kernel/net/phy.rs 1 addition, 1 deletionrust/kernel/net/phy.rs
- rust/kernel/print.rs 0 additions, 5 deletionsrust/kernel/print.rs
- rust/kernel/str.rs 1 addition, 4 deletionsrust/kernel/str.rs
- rust/kernel/sync/arc.rs 0 additions, 1 deletionrust/kernel/sync/arc.rs
- rust/kernel/sync/condvar.rs 0 additions, 1 deletionrust/kernel/sync/condvar.rs
- rust/kernel/sync/lock.rs 1 addition, 1 deletionrust/kernel/sync/lock.rs
- rust/kernel/sync/lock/mutex.rs 0 additions, 2 deletionsrust/kernel/sync/lock/mutex.rs
- rust/kernel/sync/lock/spinlock.rs 0 additions, 2 deletionsrust/kernel/sync/lock/spinlock.rs
- rust/kernel/task.rs 1 addition, 1 deletionrust/kernel/task.rs
- rust/kernel/workqueue.rs 1 addition, 3 deletionsrust/kernel/workqueue.rs
Please register or sign in to comment