From: "Danilo Krummrich" <dakr@kernel.org>
To: "Gary Guo" <gary@garyguo.net>
Cc: <acourbot@nvidia.com>, <aliceryhl@google.com>,
<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] gpu: nova-core: use a single try_pin_init!() block in probe()
Date: Mon, 28 Sep 2026 14:00:45 +0200 [thread overview]
Message-ID: <DLQXLV1FYMQS.JBP531K4P4T8@kernel.org> (raw)
In-Reply-To: <DLQX3FCYMAGD.3MS8E1JK5J7D2@garyguo.net>
On Mon Sep 28, 2026 at 1:36 PM CEST, Gary Guo wrote:
> I think this doesn't need to use `pin_chain`? You can do
>
> gpu <- ...,
>
> _: {
> #[cfg(...)]
> gpu.run_self_tests(pdev);
> }
Unfortunately, this produces the following error.
error[E0382]: borrow of moved value: `gpu`
--> drivers/gpu/nova-core/driver.rs:140:62
|
119 | gpu <- Gpu::new(
| --- move occurs because `gpu` has type `core::pin::Pin<&mut gpu::Gpu<'_>>`, which does not implement the `Copy` trait
...
129 | gpu.run_selftests(pdev);
| --- value moved here
...
140 | Pin::new_unchecked(&*core::ptr::from_ref(gpu.as_ref().get_ref()))
| ^^^ value borrowed here after move
error: aborting due to 1 previous error
next prev parent reply other threads:[~2026-09-28 12:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 14:44 [PATCH] gpu: nova-core: use a single try_pin_init!() block in probe() Danilo Krummrich
2026-09-28 0:23 ` Alexandre Courbot
2026-09-28 13:48 ` Danilo Krummrich
2026-09-29 20:31 ` John Hubbard
2026-09-29 20:43 ` Danilo Krummrich
2026-09-28 4:17 ` Eliot Courtney
2026-09-28 11:36 ` Gary Guo
2026-09-28 12:00 ` Danilo Krummrich [this message]
2026-09-28 12:10 ` Gary Guo
2026-09-28 12:15 ` Danilo Krummrich
2026-09-28 13:53 ` Gary Guo
2026-09-28 13:56 ` Danilo Krummrich
2026-09-29 19:12 ` Danilo Krummrich
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=DLQXLV1FYMQS.JBP531K4P4T8@kernel.org \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=nova-gpu@lists.linux.dev \
/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