All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Francis Laniel" <laniel_francis@privacyrequired.com>
Cc: "Michal Wilczynski" <m.wilczynski@samsung.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"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>,
	linux-pwm@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] rust: pwm: use pin_init::zeroed() to initialize pwm_ops
Date: Sat, 30 May 2026 13:55:18 +0900	[thread overview]
Message-ID: <DIVQS6VVK2C7.1LU92D1Q0C3PR@nvidia.com> (raw)
In-Reply-To: <20260529153821.126823-1-laniel_francis@privacyrequired.com>

On Sat May 30, 2026 at 12:38 AM JST, Francis Laniel wrote:
> Replace unsafe block containing core::mem::zeroed by calling
> pin_init::zeroed().
> This is safer, as this function is guarded by trait contrary to
> core::mem:zeroed().

Typo: core::mem::zeroed() (probably moot if you reuse Benno's commit
message as suggested by Miguel though).

> Also, we can call this because all fields in pwm_ops, i.e. function
> pointers in Option<> and usize, are Zeroable.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1189
> Signed-off-by: Francis Laniel <laniel_francis@privacyrequired.com>

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>

  parent reply	other threads:[~2026-05-30  4:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260529154838eucas1p25f3bf881090a8a80556bc2f1dfc278b4@eucas1p2.samsung.com>
2026-05-29 15:38 ` [PATCH v1] rust: pwm: use pin_init::zeroed() to initialize pwm_ops Francis Laniel
2026-05-29 16:45   ` Miguel Ojeda
2026-06-02  7:04     ` Francis Laniel
2026-05-30  4:55   ` Alexandre Courbot [this message]
2026-05-30 17:49   ` Michal Wilczynski

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=DIVQS6VVK2C7.1LU92D1Q0C3PR@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=laniel_francis@privacyrequired.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=tmgross@umich.edu \
    --cc=ukleinek@kernel.org \
    /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.