Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH -next] rust: fwctl: replace `__pinned_init` with `raw_try_init`
@ 2026-08-18 10:53 Miguel Ojeda
  2026-08-18 12:55 ` Jason Gunthorpe
  0 siblings, 1 reply; 9+ messages in thread
From: Miguel Ojeda @ 2026-08-18 10:53 UTC (permalink / raw)
  To: Mark Brown, Dave Jiang, Jason Gunthorpe, Saeed Mahameed, Zhi Wang,
	Benno Lossin, Gary Guo, Miguel Ojeda
  Cc: linux-next, Jonathan Cameron, rust-for-linux, Boqun Feng,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan

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:

    error[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>`

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/kernel/fwctl.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/fwctl.rs b/rust/kernel/fwctl.rs
index e6a8513a47d0..f29244fb0d1d 100644
--- a/rust/kernel/fwctl.rs
+++ b/rust/kernel/fwctl.rs
@@ -462,7 +462,7 @@ impl<T: Operations> VTable<T> {
         // `uctx_size`.
         unsafe {
             device.with_registration_data(|device, reg_data| {
-                match T::open(device, reg_data).__pinned_init(uctx_ptr) {
+                match pin_init::raw_try_init(uctx_ptr, T::open(device, reg_data)) {
                     Ok(()) => 0,
                     Err(e) => e.to_errno(),
                 }

base-commit: e6664f2b33db9b6811eb4cec109f06cb2b4f458d
--
2.55.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-18 14:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox