Skip to content

Commit 2d49505

Browse files
wedsonafojeda
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 Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 9ffe2a7 commit 2d49505

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
@@ -27,9 +27,7 @@ compile_error!("Missing kernel configuration for conditional compilation");
2727
// Allow proc-macros to refer to `::kernel` inside the `kernel` crate (this crate).
2828
extern crate self as kernel;
2929

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

0 commit comments

Comments
 (0)