Rust for Linux List
 help / color / mirror / Atom feed
From: "Gary Guo" <gary@garyguo.net>
To: "Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>,
	"Michal Wilczynski" <m.wilczynski@samsung.com>
Cc: <rust-for-linux@vger.kernel.org>, <linux-pwm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/5] rust: pin-init: add `ptr_init` and `ptr_try_init` and recommend over `__init`
Date: Wed, 05 Aug 2026 11:56:48 +0100	[thread overview]
Message-ID: <DKGYFH95Q42E.3GGHZCD6BGWU@garyguo.net> (raw)
In-Reply-To: <DKGXPILQQPJH.2ISNN9UUFUBGS@kernel.org>

On Wed Aug 5, 2026 at 11:22 AM BST, Benno Lossin wrote:
> On Wed Jul 29, 2026 at 5:38 PM CEST, Gary Guo wrote:
>> The `__init` method is not designed to be a public API (existence of "__"
>> is a hint for this); but currently there is no other API that allows raw
>> initialization on pointers. Add `ptr_init` and `ptr_try_init` and recommend
>> people to use this instead if raw pointer initialization is needed.
>
> How about we call these two functions `raw_init` and `raw_try_init`
> respectively? I feel like that conveys the meaning of what they are
> doing much better.
>
> With that: Reviewed-by: Benno Lossin <lossin@kernel.org>

Hmm, I agree that these names are better.

Given that I've picked these to pin-init-next already, I've amended the tree.
Could you check the changes I made there?

Best,
Gary

>
> Cheers,
> Benno
>
>> Signed-off-by: Gary Guo <gary@garyguo.net>
>> ---
>>  rust/pin-init/examples/static_init.rs |  5 +++--
>>  rust/pin-init/src/lib.rs              | 32 +++++++++++++++++++++++++++++++-
>>  2 files changed, 34 insertions(+), 3 deletions(-)



  reply	other threads:[~2026-08-05 10:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 15:38 [PATCH v2 0/5] rust: pin-init: merge `__init` and `__pinned_init` Gary Guo
2026-07-29 15:38 ` [PATCH v2 1/5] rust: pin-init: examples: use `Wrapper::pin_init` instead of manual reimplementation Gary Guo
2026-07-29 15:38 ` [PATCH v2 2/5] rust: pin-init: merge `__pinned_init` and `__init` Gary Guo
2026-07-29 15:38 ` [PATCH v2 3/5] rust: pin-init: add `ptr_init` and `ptr_try_init` and recommend over `__init` Gary Guo
2026-08-05 10:22   ` Benno Lossin
2026-08-05 10:56     ` Gary Guo [this message]
2026-07-29 15:38 ` [PATCH v2 4/5] rust: treewide: replace `__pinned_init` with `ptr_[try_]init` Gary Guo
2026-07-30 14:03   ` Danilo Krummrich
2026-08-03 12:19   ` Miguel Ojeda
2026-07-29 15:38 ` [PATCH v2 5/5] rust: pin-init: remove `__pinned_init` method for `cfg(kernel)` Gary Guo
2026-08-03 13:54 ` [PATCH v2 0/5] rust: pin-init: merge `__init` and `__pinned_init` Gary Guo

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=DKGYFH95Q42E.3GGHZCD6BGWU@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=m.wilczynski@samsung.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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