diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2025-11-05 13:03:28 +0100 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-11-11 19:45:23 +1100 |
| commit | d8407396f128d8bf4d06282b636df3f26db208c1 (patch) | |
| tree | 30542bcbbb13309b88896c36a5d4aec866e5411f /rust/kernel/pci.rs | |
| parent | 9d39842f6afcd0438c8353a9764d624eef2d160a (diff) | |
rust: pci: use "kernel vertical" style for imports
Convert all imports in the PCI Rust module to use "kernel vertical"
style.
With this subsequent patches neither introduce unrelated changes nor
leave an inconsistent import pattern.
While at it, drop unnecessary imports covered by prelude::*.
Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
Reviewed-by: Zhi Wang <zhiw@nvidia.com>
Link: https://patch.msgid.link/20251105120352.77603-1-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/pci.rs')
| -rw-r--r-- | rust/kernel/pci.rs | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index b68ef4e575fc..410b79d46632 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -5,27 +5,46 @@ //! C header: [`include/linux/pci.h`](srctree/include/linux/pci.h) use crate::{ - bindings, container_of, device, - device_id::{RawDeviceId, RawDeviceIdIndex}, + bindings, + container_of, + device, + device_id::{ + RawDeviceId, + RawDeviceIdIndex, // + }, driver, - error::{from_result, to_result, Result}, + error::{ + from_result, + to_result, // + }, + prelude::*, str::CStr, types::Opaque, - ThisModule, + ThisModule, // }; use core::{ marker::PhantomData, - ptr::{addr_of_mut, NonNull}, + ptr::{ + addr_of_mut, + NonNull, // + }, }; -use kernel::prelude::*; mod id; mod io; mod irq; -pub use self::id::{Class, ClassMask, Vendor}; +pub use self::id::{ + Class, + ClassMask, + Vendor, // +}; pub use self::io::Bar; -pub use self::irq::{IrqType, IrqTypes, IrqVector}; +pub use self::irq::{ + IrqType, + IrqTypes, + IrqVector, // +}; /// An adapter for the registration of PCI drivers. pub struct Adapter<T: Driver>(T); |
