rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: 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:00:23 +0100	[thread overview]
Message-ID: <CANiq72k_ez+M_xEJaDCKS9uSbzHd35osnuXjGqZf1jq=sM_uxA@mail.gmail.com> (raw)
In-Reply-To: <4db9dae5f659512146bd441cf2edf5a4aca16b93.camel@mailbox.org>

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.

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

  reply	other threads:[~2025-11-18  9:00 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 [this message]
2025-11-18  9:33       ` Philipp Stanner
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='CANiq72k_ez+M_xEJaDCKS9uSbzHd35osnuXjGqZf1jq=sM_uxA@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --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=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).