diff options
author | Wedson Almeida Filho <walmeida@microsoft.com> | 2024-03-27 22:35:54 -0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2024-04-16 22:03:14 +0200 |
commit | 31d94d8f586df55e7dce47a67a8428f46d09f906 (patch) | |
tree | 1025540564227f4611a60303381a433e6076d390 /rust/kernel | |
parent | 8db31d3f3bd5dbc8cf3a22bba04b4b4add7f984e (diff) |
rust: kernel: move `allocator` module under `alloc`
We will add more to the `alloc` module in subsequent patches (e.g.,
allocation flags and extension traits).
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20240328013603.206764-2-wedsonaf@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r-- | rust/kernel/alloc.rs | 7 | ||||
-rw-r--r-- | rust/kernel/alloc/allocator.rs (renamed from rust/kernel/allocator.rs) | 0 | ||||
-rw-r--r-- | rust/kernel/lib.rs | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs new file mode 100644 index 000000000000..9aa5077d4a4c --- /dev/null +++ b/rust/kernel/alloc.rs @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! Extensions to the [`alloc`] crate. + +#[cfg(not(test))] +#[cfg(not(testlib))] +mod allocator; diff --git a/rust/kernel/allocator.rs b/rust/kernel/alloc/allocator.rs index 01ad139e19bc..01ad139e19bc 100644 --- a/rust/kernel/allocator.rs +++ b/rust/kernel/alloc/allocator.rs diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 08dbc3eebaef..1e910fe7c2c7 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -27,9 +27,7 @@ compile_error!("Missing kernel configuration for conditional compilation"); // Allow proc-macros to refer to `::kernel` inside the `kernel` crate (this crate). extern crate self as kernel; -#[cfg(not(test))] -#[cfg(not(testlib))] -mod allocator; +pub mod alloc; mod build_assert; pub mod error; pub mod init; |