Skip to content

Commit 31d94d8

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 <[email protected]> Signed-off-by: Wedson Almeida Filho <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 8db31d3 commit 31d94d8

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)