From: "Benno Lossin" <lossin@kernel.org>
To: "Daniel Almeida" <daniel.almeida@collabora.com>,
"Konrad Dybcio" <konradybcio@kernel.org>
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>,
"Georgi Djakov" <djakov@kernel.org>,
"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
"Bjorn Andersson" <bjorn.andersson@oss.qualcomm.com>,
"Marijn Suijten" <marijn.suijten@somainline.org>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-pm@vger.kernel.org,
"Konrad Dybcio" <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH DNM 2/2] interconnect: Add a test Rust consumer driver
Date: Wed, 23 Jul 2025 15:22:49 +0200 [thread overview]
Message-ID: <DBJGTCPDUU4J.16S98YARG0S7O@kernel.org> (raw)
In-Reply-To: <D4552EF5-21DB-44AF-8E45-F57B0B8CB853@collabora.com>
On Wed Jul 23, 2025 at 3:10 PM CEST, Daniel Almeida wrote:
> On 22 Jul 2025, at 18:14, Konrad Dybcio <konradybcio@kernel.org> wrote:
>> +#[pin_data]
>> +struct IccTestConsumerDriver {
>> + #[pin]
>> + path: IccPath,
>> +}
>
> I don’t think this does anything useful without PhantomPinned, but Benno is
> the right person to chime in here.
It does do something useful, there just has to be one type marked with
`#[pin]` that is `!Unpin` (so for example `PhantomPinned`, `Opaque<T>`
etc.).
In this case however, `IccPath` is a newtype of `*mut bindings::icc_path`
which isn't `PhantomPinned`, so this doesn't ensure that the
`IccTestConsumerDriver` will stay pinned after initializing.
> More importantly though, why do you have #[pin] on IccPath?
Another question is: why is `IccPath` not a newtype of
`Opaque<bindings::icc_path>`? And then one can use `&IccPath`.
---
Cheers,
Benno
next prev parent reply other threads:[~2025-07-23 13:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 21:14 [PATCH 0/2] Add initial interconnect (icc_path) Rust abstractions Konrad Dybcio
2025-07-22 21:14 ` [PATCH 1/2] rust: Add initial interconnect framework abstractions Konrad Dybcio
2025-07-23 10:42 ` Miguel Ojeda
2025-07-23 11:32 ` Konrad Dybcio
2025-07-23 11:41 ` Miguel Ojeda
2025-07-23 11:42 ` Miguel Ojeda
2025-07-23 11:53 ` Konrad Dybcio
2025-07-23 10:44 ` Daniel Sedlak
2025-07-23 11:36 ` Konrad Dybcio
2025-07-23 11:34 ` kernel test robot
2025-07-23 12:36 ` Daniel Almeida
2025-07-22 21:14 ` [PATCH DNM 2/2] interconnect: Add a test Rust consumer driver Konrad Dybcio
2025-07-23 13:10 ` Daniel Almeida
2025-07-23 13:22 ` Benno Lossin [this message]
2025-07-23 10:22 ` [PATCH 0/2] Add initial interconnect (icc_path) Rust abstractions Miguel Ojeda
2025-07-24 12:36 ` Konrad Dybcio
2025-07-24 15:55 ` 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=DBJGTCPDUU4J.16S98YARG0S7O@kernel.org \
--to=lossin@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=djakov@kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gary@garyguo.net \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--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).