Rust for Linux List
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Gary Guo <gary@garyguo.net>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Dave Jiang" <dave.jiang@intel.com>,
	"Saeed Mahameed" <saeedm@nvidia.com>,
	"Zhi Wang" <zhiw@nvidia.com>, "Benno Lossin" <lossin@kernel.org>,
	linux-next@vger.kernel.org, "Jonathan Cameron" <jic23@kernel.org>,
	rust-for-linux@vger.kernel.org, "Boqun Feng" <boqun@kernel.org>,
	"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>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>
Subject: Re: [PATCH -next] rust: fwctl: replace `__pinned_init` with `raw_try_init`
Date: Tue, 18 Aug 2026 10:20:22 -0300	[thread overview]
Message-ID: <20260818132022.GC5432@nvidia.com> (raw)
In-Reply-To: <DKS3G1HH0835.P8T7VT9VW24I@garyguo.net>

On Tue, Aug 18, 2026 at 02:11:57PM +0100, Gary Guo wrote:
> On Tue Aug 18, 2026 at 1:55 PM BST, Jason Gunthorpe wrote:
> > On Tue, Aug 18, 2026 at 12:53:50PM +0200, Miguel Ojeda wrote:
> >> Commit
> >> 
> >>   ea7da3116015 ("rust: treewide: replace `__pinned_init` with `raw_[try_]init`")
> >> 
> >> from the pin-init tree replaced the method before removing it, but commit
> >> 
> >>   e052daab94ee ("rust: introduce abstractions for fwctl")
> >> 
> >> from the fwctl tree added a new use.
> >> 
> >> Thus replace that one as well to fix this error in next-20260817:
[E0599]: no method named `__pinned_init` found for associated type `impl pin_init::PinInit<T, error::Error>` in the current scope
> >>        --> rust/kernel/fwctl.rs:465:49
> >>         |
> >>     465 |                 match T::open(device, reg_data).__pinned_init(uctx_ptr) {
> >>         |                                                 ^^^^^^^^^^^^^ method not found in `impl pin_init::PinInit<T, error::Error>`
> >
> > If you delete functions like this then you break everyone elses branches :|
> 
> I'm not sure how this break everyone elses' branches? It only breaks linux-next
> but that's why it exists in the first place, to catch tree
> conflicts.

linux-next is to catch missed things, you shouldn't use it to
purposefully cause conflicts during the merge window..

So for example introduce your new API and do some conversions, then
remove the old API down the road after the merge window is a more
expected work flow.

> > I can't use this patch:
> >
> > 465 |              match pin_init::raw_try_init(uctx_ptr, T::open(device, reg_data)) {
> >     |                              ^^^^^^^^^^^^ not found in `pin_init`
> >
> >
> > Linus will have to fix this as a merge conflict.
> 
> This patch is sent as a semantic conflict resolution so yes it should be applied
> by Linus.

That's not really how things work. Now Miguel and I both have to send
Linus a pointer to this hunk because we don't know what order he will
merge the branches in, and last one to get merged needs him to put
this in the merge commit.

> If we want to do a cycle's grace period then reverting commit 1f7fa1374d3b
> ("rust: pin-init: remove `__pinned_init` method for `cfg(kernel)`") should be
> sufficient. That said, I am not sure it's worth doing.

Probably not, but it doesn't hurt to understand the expected work flow
as rust grows bigger.

Jason

  reply	other threads:[~2026-08-18 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 10:53 [PATCH -next] rust: fwctl: replace `__pinned_init` with `raw_try_init` Miguel Ojeda
2026-08-18 12:55 ` Jason Gunthorpe
2026-08-18 13:11   ` Gary Guo
2026-08-18 13:20     ` Jason Gunthorpe [this message]
2026-08-18 13:40       ` Gary Guo
2026-08-18 14:16       ` Mark Brown
2026-08-18 14:23         ` Jason Gunthorpe
2026-08-18 14:30         ` Danilo Krummrich
2026-08-18 14:44           ` Mark Brown

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=20260818132022.GC5432@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dave.jiang@intel.com \
    --cc=gary@garyguo.net \
    --cc=jic23@kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    --cc=zhiw@nvidia.com \
    /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