From: Wedson Almeida Filho <wedsonaf@gmail.com>
To: rust-for-linux@vger.kernel.org
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
linux-kernel@vger.kernel.org,
"Wedson Almeida Filho" <walmeida@microsoft.com>
Subject: [PATCH 01/10] rust: kernel: move `allocator` module under `alloc`
Date: Mon, 25 Mar 2024 16:54:09 -0300 [thread overview]
Message-ID: <20240325195418.166013-2-wedsonaf@gmail.com> (raw)
In-Reply-To: <20240325195418.166013-1-wedsonaf@gmail.com>
From: Wedson Almeida Filho <walmeida@microsoft.com>
We will add more to the `alloc` module in subsequent patches (e.g.,
allocation flags and extension traits).
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
---
rust/kernel/alloc.rs | 7 +++++++
rust/kernel/{ => alloc}/allocator.rs | 0
rust/kernel/lib.rs | 4 +---
3 files changed, 8 insertions(+), 3 deletions(-)
create mode 100644 rust/kernel/alloc.rs
rename rust/kernel/{ => alloc}/allocator.rs (100%)
diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs
new file mode 100644
index 000000000000..ccd4149932c3
--- /dev/null
+++ b/rust/kernel/alloc.rs
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
+
+//! Allocation support.
+
+#[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 be68d5e567b1..51f30e55bd00 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -28,9 +28,7 @@
// 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;
--
2.34.1
next prev parent reply other threads:[~2024-03-25 19:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 19:54 [PATCH 00/10] Allocation APIs Wedson Almeida Filho
2024-03-25 19:54 ` Wedson Almeida Filho [this message]
2024-03-25 21:56 ` [PATCH 01/10] rust: kernel: move `allocator` module under `alloc` Benno Lossin
2024-03-26 0:04 ` Wedson Almeida Filho
2024-03-25 19:54 ` [PATCH 02/10] rust: alloc: introduce the `VecExt` trait Wedson Almeida Filho
2024-03-25 22:05 ` Benno Lossin
2024-03-26 0:02 ` Wedson Almeida Filho
2024-03-25 19:54 ` [PATCH 03/10] kbuild: use the upstream `alloc` crate Wedson Almeida Filho
2024-03-25 19:54 ` [PATCH 04/10] rust: alloc: remove our fork of the " Wedson Almeida Filho
2024-03-25 22:24 ` Benno Lossin
2024-03-25 19:54 ` [PATCH 05/10] rust: alloc: introduce allocation flags Wedson Almeida Filho
2024-03-25 22:26 ` Benno Lossin
2024-03-25 19:54 ` [PATCH 06/10] rust: alloc: introduce the `BoxExt` trait Wedson Almeida Filho
2024-03-25 22:37 ` Benno Lossin
2024-03-26 0:17 ` Wedson Almeida Filho
2024-03-26 13:30 ` Benno Lossin
2024-03-27 1:54 ` Wedson Almeida Filho
2024-03-27 1:55 ` Wedson Almeida Filho
2024-03-25 19:54 ` [PATCH 07/10] rust: alloc: update `VecExt` to take allocation flags Wedson Almeida Filho
2024-03-25 20:44 ` Boqun Feng
2024-03-26 0:03 ` Wedson Almeida Filho
2024-03-26 13:58 ` Benno Lossin
2024-03-25 19:54 ` [PATCH 08/10] rust: sync: update `Arc` and `UniqueArc` " Wedson Almeida Filho
2024-03-26 14:01 ` Benno Lossin
2024-03-25 19:54 ` [PATCH 09/10] rust: init: update `init` module " Wedson Almeida Filho
2024-03-26 14:08 ` Benno Lossin
2024-03-27 2:17 ` Wedson Almeida Filho
2024-03-25 19:54 ` [PATCH 10/10] rust: kernel: remove usage of `allocator_api` unstable feature Wedson Almeida Filho
2024-03-26 15:27 ` Benno Lossin
2024-03-27 2:13 ` Wedson Almeida Filho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240325195418.166013-2-wedsonaf@gmail.com \
--to=wedsonaf@gmail.com \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=walmeida@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox