From: Wedson Almeida Filho Date: Thu, 28 Mar 2024 01:35:54 +0000 (-0300) Subject: rust: kernel: move `allocator` module under `alloc` X-Git-Tag: v6.10-rc1~214^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31d94d8f586df55e7dce47a67a8428f46d09f906;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20240328013603.206764-2-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda --- diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs new file mode 100644 index 0000000000000..9aa5077d4a4c8 --- /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 similarity index 100% rename from rust/kernel/allocator.rs rename to rust/kernel/alloc/allocator.rs diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 08dbc3eebaefc..1e910fe7c2c77 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;