All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: "Nicolás Antinori" <nico.antinori.7@gmail.com>
Cc: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Christian Brauner" <christian@brauner.io>,
	"Carlos Llamas" <cmllamas@google.com>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Benno Lossin" <lossin@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Boqun Feng" <boqun@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Gary Guo" <gary@garyguo.net>, "Onur Özkan" <work@onurozkan.dev>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH] rust_binder: use pin_init::zeroed for file_operations initialization
Date: Thu, 2 Jul 2026 11:09:22 +0000	[thread overview]
Message-ID: <akZG4sDyogS9nBf8@google.com> (raw)
In-Reply-To: <DJMHZB23PNGV.2SM0ER4JFQYI@gmail.com>

On Tue, Jun 30, 2026 at 12:43:25PM -0300, Nicolás Antinori wrote:
> On Sun Jun 28, 2026 at 7:16 AM -03, Miguel Ojeda wrote:
> > On Fri, Jun 26, 2026 at 11:44 PM Nicolás Antinori
> > <nico.antinori.7@gmail.com> wrote:
> >>
> >> -    // SAFETY: All zeroes is safe for the `file_operations` type.
> >> -    let zeroed_ops = unsafe { core::mem::MaybeUninit::zeroed().assume_init() };
> >> +    let zeroed_ops = pin_init::zeroed();
> >
> > I would just remove the variable and put `zeroed()` directly in the
> > fops initializer like we do in other cases, but it is fine of course.
> 
> I thought of that as well but I tried to touch as little as possible (I
> assumed that was in a variable for a reason). I can send a v2 if that is 
> preferred!

I think it was extracted to a variable for line length reasons. You can
remove the variable if you want.

Alice

  reply	other threads:[~2026-07-02 11:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 21:44 [PATCH] rust_binder: use pin_init::zeroed for file_operations initialization Nicolás Antinori
2026-06-27  8:25 ` Alexandre Courbot
2026-06-28 10:16 ` Miguel Ojeda
2026-06-30 15:43   ` Nicolás Antinori
2026-07-02 11:09     ` Alice Ryhl [this message]
2026-07-02 11:08 ` 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=akZG4sDyogS9nBf8@google.com \
    --to=aliceryhl@google.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=arve@android.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=christian@brauner.io \
    --cc=cmllamas@google.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=nico.antinori.7@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tamird@kernel.org \
    --cc=tkjos@android.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.