From: Gary Guo <gary@garyguo.net>
To: Benno Lossin <benno.lossin@proton.me>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] rust: init: add `write_[pin_]init` functions
Date: Thu, 1 Aug 2024 13:30:55 +0100 [thread overview]
Message-ID: <20240801133055.6d127fd1@eugeo> (raw)
In-Reply-To: <20240708205325.1275473-2-benno.lossin@proton.me>
On Mon, 08 Jul 2024 20:53:46 +0000
Benno Lossin <benno.lossin@proton.me> wrote:
> Sometimes it is necessary to split allocation and initialization into
> two steps. One such situation is when reusing existing allocations
> obtained via `Box::drop_contents`. See [1] for an example.
> In order to support this use case add `write_[pin_]init` functions to the
> pin-init API. These functions operate on already allocated smart
> pointers that wrap `MaybeUninit<T>`.
>
> Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
> Link: https://lore.kernel.org/rust-for-linux/f026532f-8594-4f18-9aa5-57ad3f5bc592@proton.me/ [1]
> ---
> rust/kernel/init.rs | 84 ++++++++++++++++++++++++++++++------------
> rust/kernel/prelude.rs | 2 +-
> 2 files changed, 61 insertions(+), 25 deletions(-)
next prev parent reply other threads:[~2024-08-01 12:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 20:53 [PATCH v2 1/2] rust: kernel: add `drop_contents` to `BoxExt` Benno Lossin
2024-07-08 20:53 ` [PATCH v2 2/2] rust: init: add `write_[pin_]init` functions Benno Lossin
2024-07-08 21:27 ` Boqun Feng
2024-08-01 9:02 ` Alice Ryhl
2024-08-01 12:30 ` Gary Guo [this message]
2024-07-08 21:14 ` [PATCH v2 1/2] rust: kernel: add `drop_contents` to `BoxExt` Boqun Feng
2024-07-08 21:52 ` Boqun Feng
2024-07-17 19:54 ` Benno Lossin
2024-08-01 9:01 ` Alice Ryhl
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=20240801133055.6d127fd1@eugeo \
--to=gary@garyguo.net \
--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=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=wedsonaf@gmail.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;
as well as URLs for NNTP newsgroup(s).