summaryrefslogtreecommitdiff
path: root/rust/kernel/io/resource.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-11-04 14:32:54 +0100
committerDanilo Krummrich <dakr@kernel.org>2025-11-11 19:43:39 +1100
commit9d39842f6afcd0438c8353a9764d624eef2d160a (patch)
tree8635c2094063ef4c114c68e9e28488bc3708fd22 /rust/kernel/io/resource.rs
parent0bc605713f16ad77e0a3f30f992aa3794c381372 (diff)
rust: io: cleanup imports and use "kernel vertical" style
Commit 46f045db5a94 ("rust: Add read_poll_timeout_atomic function") initiated the first import change in the I/O module using the agreed "kernel vertical" import style [1]. For consistency throughout the module, adjust all other imports accordingly. While at it, drop unnecessary imports covered by prelude::*. Link: https://docs.kernel.org/rust/coding-guidelines.html#imports [1] Reviewed-by: Zhi Wang <zhiw@nvidia.com> Link: https://patch.msgid.link/20251104133301.59402-1-dakr@kernel.org [ Use prelude::* in io/poll.rs. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/io/resource.rs')
-rw-r--r--rust/kernel/io/resource.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/rust/kernel/io/resource.rs b/rust/kernel/io/resource.rs
index bea3ee0ed87b..81220493a7f3 100644
--- a/rust/kernel/io/resource.rs
+++ b/rust/kernel/io/resource.rs
@@ -5,12 +5,16 @@
//!
//! C header: [`include/linux/ioport.h`](srctree/include/linux/ioport.h)
-use core::ops::Deref;
-use core::ptr::NonNull;
-
-use crate::prelude::*;
-use crate::str::{CStr, CString};
-use crate::types::Opaque;
+use core::{
+ ops::Deref,
+ ptr::NonNull, //
+};
+
+use crate::{
+ prelude::*,
+ str::CString,
+ types::Opaque, //
+};
/// Resource Size type.
///