[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DBDNA6P0SNQR.36OEHQWYU2PDL@kernel.org>
Date: Wed, 16 Jul 2025 19:10:55 +0200
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Daniel Almeida" <daniel.almeida@...labora.com>
Cc: "Alice Ryhl" <aliceryhl@...gle.com>, "Miguel Ojeda" <ojeda@...nel.org>,
"Alex Gaynor" <alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>,
"Gary Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
Hindborg" <a.hindborg@...nel.org>, "Trevor Gross" <tmgross@...ch.edu>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>, "Rafael J. Wysocki"
<rafael@...nel.org>, <linux-kernel@...r.kernel.org>,
<rust-for-linux@...r.kernel.org>, "Fiona Behrens" <me@...enk.dev>
Subject: Re: [PATCH v13 1/3] rust: io: add resource abstraction
On Wed Jul 16, 2025 at 6:52 PM CEST, Daniel Almeida wrote:
> I guess the easiest solution is to drop 'static in order to account for the
> above, and change the signature to return Option<&CStr> instead.
I think you have to do both, this...
> We can also change Region to own the name, and pass name by value here:
...and this.
Otherwise you'd need to ensure that the Resource you create the Region from
out-lives the Region, which I think we can't.
> pub fn request_region(
> &self,
> start: ResourceSize,
> size: ResourceSize,
> name: &'static CStr <------
>
>
> Thoughts?
>
> — Daniel
Powered by blists - more mailing lists