From: Francis Laniel <laniel_francis@privacyrequired.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.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: Tue, 02 Jun 2026 10:04:43 +0300 [thread overview]
Message-ID: <2833204.mvXUDI8C0e@pmachine> (raw)
In-Reply-To: <CANiq72=DK_qr96K7V=akgHqm0z4msymJ+VRxY0f1uqmyDmbZkw@mail.gmail.com>
Hi,
Le vendredi 29 mai 2026, 19:45:06 heure d’été d’Europe de l’Est Miguel Ojeda a
écrit :
> On Fri, May 29, 2026 at 5:48 PM Francis Laniel
>
> <laniel_francis@privacyrequired.com> 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().
>
> It is definitely safer, but it is actually fully safe, i.e. it is a
> safe `const fn` after all, which is great. I would say removing
> `unsafe` code is the justification, even if of course the function is
> able to be safe thanks to implementing the trait only for certain
> types. (Also missing `:`).
>
> I would suggest reusing Benno's commit message from the series he
> links in the issue instead, e.g.
>
> https://lore.kernel.org/all/20250814093046.2071971-8-lossin@kernel.org/
>
> > Link: https://github.com/Rust-for-Linux/linux/issues/1189
>
> Please use Suggested-by like the issue mentions :)
>
> Suggested-by: Benno Lossin <lossin@kernel.org>
I read the issue too fast! I will send a v2 with the corresponding tags and
new commit message! Thank you for your suggestions!
> Thanks!
>
> Cheers,
> Miguel
Best regards,
next prev parent reply other threads:[~2026-06-02 7:12 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 [this message]
2026-05-30 4:55 ` Alexandre Courbot
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=2833204.mvXUDI8C0e@pmachine \
--to=laniel_francis@privacyrequired.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=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=m.wilczynski@samsung.com \
--cc=miguel.ojeda.sandonis@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox