diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-05-13 21:09:15 +0200 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-05-20 17:34:17 +0200 |
| commit | 9b25d4111e913b74a1756601449484c44fc58842 (patch) | |
| tree | ccd2a879247220771e4820a9440aa1a71bbbde22 /rust/kernel/alloc/allocator.rs | |
| parent | f497aae6ded43f91b1dbf29a35d7062823635640 (diff) | |
rust: alloc: cleanup imports and use "kernel vertical" style
Change all imports in the alloc module to use the "kernel vertical"
import style [1].
While at it, drop unnecessary imports covered by prelude::*.
Link: https://docs.kernel.org/rust/coding-guidelines.html#imports [1]
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260513190946.619810-1-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator.rs')
| -rw-r--r-- | rust/kernel/alloc/allocator.rs | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/rust/kernel/alloc/allocator.rs b/rust/kernel/alloc/allocator.rs index 63bfb91b3671..af20332d59f7 100644 --- a/rust/kernel/alloc/allocator.rs +++ b/rust/kernel/alloc/allocator.rs @@ -8,14 +8,25 @@ //! //! Reference: <https://docs.kernel.org/core-api/memory-allocation.html> -use super::Flags; -use core::alloc::Layout; -use core::ptr; -use core::ptr::NonNull; - -use crate::alloc::{AllocError, Allocator, NumaNode}; -use crate::bindings; -use crate::page; +use super::{ + AllocError, + Allocator, + Flags, + NumaNode, // +}; + +use crate::{ + bindings, + page, // +}; + +use core::{ + alloc::Layout, + ptr::{ + self, + NonNull, // + }, // +}; const ARCH_KMALLOC_MINALIGN: usize = bindings::ARCH_KMALLOC_MINALIGN; |
