From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Atharv Dubey <atharvd440@gmail.com>
Cc: arnd@arndb.de, gregkh@linuxfoundation.org, ojeda@kernel.org,
alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net,
bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
dakr@kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: miscdevice: use `pin_init::zeroed()` for C type initialization
Date: Fri, 28 Nov 2025 20:08:06 +0100 [thread overview]
Message-ID: <CANiq72kmm_6fGRW9y0DXZVEmFoqi-8-YuGJifEcFF7vGQnPLHw@mail.gmail.com> (raw)
In-Reply-To: <20251128162337.12082-1-atharvd440@gmail.com>
On Fri, Nov 28, 2025 at 5:23 PM Atharv Dubey <atharvd440@gmail.com> wrote:
>
> Replace manual zero-initialization using
> `MaybeUninit::zeroed().assume_init()` with `pin_init::zeroed()`.
> The `pin_init` helper provides a safer and clearer API for
> zero-initializing C structs without requiring an `unsafe` block.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1189
> Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
Welcome! I am glad you ended up sending a patch :)
Minor procedural nit: I think this is missing:
Suggested-by: Benno Lossin <lossin@kernel.org>
It should be picked up automatically, no need to resend a v2 just for this.
Thanks!
Cheers,
Miguel
next prev parent reply other threads:[~2025-11-28 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 16:23 [PATCH] rust: miscdevice: use `pin_init::zeroed()` for C type initialization Atharv Dubey
2025-11-28 19:08 ` Miguel Ojeda [this message]
2025-11-29 6:46 ` Dirk Behme
2025-11-29 16:33 ` Miguel Ojeda
2025-12-01 14:24 ` Atharv Dubey
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=CANiq72kmm_6fGRW9y0DXZVEmFoqi-8-YuGJifEcFF7vGQnPLHw@mail.gmail.com \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=arnd@arndb.de \
--cc=atharvd440@gmail.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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).