From: Philipp Stanner <phasta@mailbox.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>, phasta@kernel.org
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Tamir Duberstein" <tamird@gmail.com>,
"Christian Schrefl" <chrisi.schrefl@gmail.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] rust: list: Add unsafe for container_of
Date: Tue, 18 Nov 2025 10:33:40 +0100 [thread overview]
Message-ID: <d31b24c850957c9026c9ff12ce7d0c9bbf26477a.camel@mailbox.org> (raw)
In-Reply-To: <CANiq72k_ez+M_xEJaDCKS9uSbzHd35osnuXjGqZf1jq=sM_uxA@mail.gmail.com>
On Tue, 2025-11-18 at 10:00 +0100, Miguel Ojeda wrote:
> On Tue, Nov 18, 2025 at 9:30 AM Philipp Stanner <phasta@mailbox.org> wrote:
> >
> > It's absolutely common to provide it. If you feel better without it, I
> > can omit it, I guess.
>
> No, it is not "absolutely common" to provide it in a case like this,
> and it is not about "feeling better" either.
It *is* absolutely common, or at least frequent, and you are the first
guy in the entire project I ever heard complaining about it. Maybe it
is often used wrongly or unnecessarily, though.
But no worries, be assured that I will take this detail into account
when working with you.
>
> > I ran rustfmt.
>
> Yes, but this is a macro -- `rustfmt` is likely not formatting that
> code. In formatted code, there are no multiline `unsafe` blocks that
> contain code after the opening brace, so it looks off.
So why then do you even suggest running rustfmt? How should I make it
check the formatting?
next prev parent reply other threads:[~2025-11-18 9:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 7:28 [PATCH v2] rust: list: Add unsafe for container_of Philipp Stanner
2025-11-18 8:20 ` Miguel Ojeda
2025-11-18 8:30 ` Philipp Stanner
2025-11-18 9:00 ` Miguel Ojeda
2025-11-18 9:33 ` Philipp Stanner [this message]
2025-11-18 17:10 ` Miguel Ojeda
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=d31b24c850957c9026c9ff12ce7d0c9bbf26477a.camel@mailbox.org \
--to=phasta@mailbox.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=chrisi.schrefl@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=phasta@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tamird@gmail.com \
--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).