Re: [PATCH] rust: Update PCI resource_start()/len() to return ResourceSize

From: Alice Ryhl
Date: Fri Aug 22 2025 - 03:45:01 EST


On Fri, Aug 22, 2025 at 6:13 AM Alistair Popple <apopple@xxxxxxxxxx> wrote:
>
> It's nicer to return native Rust types rather than the FFI bindings to a
> type so update the PCI resource bindings to return ResourceSize.
>
> Signed-off-by: Alistair Popple <apopple@xxxxxxxxxx>
> Suggested-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

> rust/kernel/pci.rs | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs
> index cae4e274f7766..ef949ff10a10a 100644
> --- a/rust/kernel/pci.rs
> +++ b/rust/kernel/pci.rs
> @@ -10,7 +10,7 @@
> devres::Devres,
> driver,
> error::{from_result, to_result, Result},
> - io::{Io, IoRaw},
> + io::{resource::ResourceSize, Io, IoRaw},

Maybe we want ResourceSize re-exported from kernel::io to make this simpler?

Alice