[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72k_ez+M_xEJaDCKS9uSbzHd35osnuXjGqZf1jq=sM_uxA@mail.gmail.com>
Date: Tue, 18 Nov 2025 10:00:23 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: phasta@...nel.org
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, Tamir Duberstein <tamird@...il.com>,
Christian Schrefl <chrisi.schrefl@...il.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] rust: list: Add unsafe for container_of
On Tue, Nov 18, 2025 at 9:30 AM Philipp Stanner <phasta@...lbox.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.
As I already explained, it is confusing and takes more time to review.
For instance, it made me double-check why you wanted to skip some
versions or why the constraint was there. Please understand that
maintainers will need to check what you wrote there and whether it is
correct.
It is also riskier for yourself, since one can also easily get it wrong.
Those constraints, as the stable kernel rules explain, are about
sending additional instructions. It also explicitly says such tagging
is unnecessary when the Fixes tag is enough.
So, no, please do not add redundant constraints when they are not needed.
> 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.
Cheers,
Miguel
Powered by blists - more mailing lists