Skip to content

Commit 066e4ce

Browse files
wedsonaffbq
authored andcommitted
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
1 parent 0201093 commit 066e4ce

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

rust/kernel/alloc.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
3+
//! Extensions to the [`alloc`] crate.
4+
5+
#[cfg(not(test))]
6+
#[cfg(not(testlib))]
7+
mod allocator;
File renamed without changes.

rust/kernel/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ compile_error!("Missing kernel configuration for conditional compilation");
2828
// Allow proc-macros to refer to `::kernel` inside the `kernel` crate (this crate).
2929
extern crate self as kernel;
3030

31-
#[cfg(not(test))]
32-
#[cfg(not(testlib))]
33-
mod allocator;
31+
pub mod alloc;
3432
mod build_assert;
3533
pub mod error;
3634
pub mod init;

0 commit comments

Comments
 (0)