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 | |
| 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')
| -rw-r--r-- | rust/kernel/pci/id.rs | 5 | ||||
| -rw-r--r-- | rust/kernel/pci/io.rs | 13 | ||||
| -rw-r--r-- | rust/kernel/pci/irq.rs | 14 |
3 files changed, 21 insertions, 11 deletions
diff --git a/rust/kernel/pci/id.rs b/rust/kernel/pci/id.rs index 7f2a7f57507f..a1de70b2176a 100644 --- a/rust/kernel/pci/id.rs +++ b/rust/kernel/pci/id.rs @@ -4,7 +4,10 @@ //! //! This module contains PCI class codes, Vendor IDs, and supporting types. -use crate::{bindings, error::code::EINVAL, error::Error, prelude::*}; +use crate::{ + bindings, + prelude::*, // +}; use core::fmt; /// PCI device class codes. diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs index 3684276b326b..0d55c3139b6f 100644 --- a/rust/kernel/pci/io.rs +++ b/rust/kernel/pci/io.rs @@ -4,14 +4,17 @@ use super::Device; use crate::{ - bindings, device, + bindings, + device, devres::Devres, - io::{Io, IoRaw}, - str::CStr, - sync::aref::ARef, + io::{ + Io, + IoRaw, // + }, + prelude::*, + sync::aref::ARef, // }; use core::ops::Deref; -use kernel::prelude::*; /// A PCI BAR to perform I/O-Operations on. /// diff --git a/rust/kernel/pci/irq.rs b/rust/kernel/pci/irq.rs index 03f2de559a8a..d9230e105541 100644 --- a/rust/kernel/pci/irq.rs +++ b/rust/kernel/pci/irq.rs @@ -4,16 +4,20 @@ use super::Device; use crate::{ - bindings, device, + bindings, + device, device::Bound, devres, - error::{to_result, Result}, - irq::{self, IrqRequest}, + error::to_result, + irq::{ + self, + IrqRequest, // + }, + prelude::*, str::CStr, - sync::aref::ARef, + sync::aref::ARef, // }; use core::ops::RangeInclusive; -use kernel::prelude::*; /// IRQ type flags for PCI interrupt allocation. #[derive(Debug, Clone, Copy)] |