From: Tamir Duberstein <tamird@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
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>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Benno Lossin" <lossin@kernel.org>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] rust: check type of `$ptr` in `container_of!`
Date: Thu, 29 May 2025 12:55:43 -0400 [thread overview]
Message-ID: <CAJ-ks9kd73fYV2+u+7PequU4Ae5o1oCubZ6FemcTENP+U5-HhA@mail.gmail.com> (raw)
In-Reply-To: <CANiq72m6dCQafKUvF5k+Fc5jo1FnGAoDA4XpGU-qNkQe+e-gew@mail.gmail.com>
On Thu, May 29, 2025 at 12:06 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Thu, May 29, 2025 at 4:40 PM Tamir Duberstein <tamird@gmail.com> wrote:
> >
> > All fine. The only problem with the version you pushed is that it
> > evaluates $ptr twice, which was flagged by Alice in the v1 review.
>
> Right -- this one also has the `&raw` too, and Benno provided the tag,
> so let me take this one. The error is a tiny bit worse with the
> `$crate::` in front now, but I think it is still good enough.
Great! Thanks!
next prev parent reply other threads:[~2025-05-29 16:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 13:11 [PATCH v4] rust: check type of `$ptr` in `container_of!` Tamir Duberstein
2025-05-29 13:24 ` Miguel Ojeda
2025-05-29 13:30 ` Miguel Ojeda
2025-05-29 14:39 ` Tamir Duberstein
2025-05-29 16:06 ` Miguel Ojeda
2025-05-29 16:55 ` Tamir Duberstein [this message]
2025-05-29 15:31 ` Benno Lossin
2025-05-29 21:19 ` 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=CAJ-ks9kd73fYV2+u+7PequU4Ae5o1oCubZ6FemcTENP+U5-HhA@mail.gmail.com \
--to=tamird@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=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=rust-for-linux@vger.kernel.org \
--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).