Rust for Linux List
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] Rust for 6.16
Date: Wed, 4 Jun 2025 21:57:49 -0700	[thread overview]
Message-ID: <aEEjzTMJm7YzS1Ks@Mac.home> (raw)
In-Reply-To: <CAHk-=wik7gvxt-CEak_4HsGziRwo6-7q9LGeW37Pj9182dJ=ow@mail.gmail.com>

On Wed, Jun 04, 2025 at 09:18:36PM -0700, Linus Torvalds wrote:
> On Wed, 4 Jun 2025 at 19:54, Miguel Ojeda <ojeda@kernel.org> wrote:
> >
> > There are a few conflicts, including semantic ones, but they are all
> > easy to apply. The resolutions in the latest linux-next are fine; I also
> > did a test merge -- please check either to catch the semantic ones
> 
> Hmm. I don't understand why the suggested merge adds those
> 
>         let self_ptr: *mut Opaque<bindings::drm_gem_object> = self_ptr.cast();
> 
>         let ptr: *mut Opaque<bindings::drm_gem_object> = obj.cast();
> 
> cases to rust/kernel/drm/gem/mod.rs, and it built cleanly for me
> without those changes, but that may be because my build doesn't
> trigger this.
> 
> But in the name of safety, and because I didn't understand that
> change, I modified my merge to do what you did.
> 

FWIW, I think this thread has the explanation:

	https://lore.kernel.org/regressions/CANiq72mFL4dn+0JppLLfxyKnM+xYwKeduFw2j07hUfxWVVHdUw@mail.gmail.com/

I believe these changes are needed because in commit b20fbbc08a36
("rust: check type of `$ptr` in `container_of!`"), we enabled the
checking for `container_of!(ptr, struct, field)` that `ptr` must be the
same type of `&struct->field`. But the drm/gem code is added from a
different repo (probably the nova tree), so the adjustment has to be
done in a merge. Miguel can keep me honest on this one ;-)

Regards,
Boqun

>                  Linus

  reply	other threads:[~2025-06-05  4:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05  2:54 [GIT PULL] Rust for 6.16 Miguel Ojeda
2025-06-05  4:18 ` Linus Torvalds
2025-06-05  4:57   ` Boqun Feng [this message]
2025-06-05  5:20     ` Miguel Ojeda
2025-06-05  5:19   ` Miguel Ojeda
2025-06-05  4:24 ` pr-tracker-bot

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=aEEjzTMJm7YzS1Ks@Mac.home \
    --to=boqun.feng@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=torvalds@linux-foundation.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