Re: [PATCH v4 19/27] samples: rust: rust_driver_pci: use HRT lifetime for Bar

From: Alexandre Courbot

Date: Mon May 25 2026 - 09:56:08 EST


On Fri May 22, 2026 at 8:34 AM JST, Danilo Krummrich wrote:
> Convert the sample driver to SampleDriver<'bound>, taking advantage of
> the lifetime-parameterized Driver trait.
>
> The driver struct holds &'bound pci::Device directly instead of
> ARef<pci::Device>, and pci::Bar<'bound> directly instead of
> Devres<pci::Bar>. This removes PinnedDrop, pin_init_scope, and runtime
> revocation checks on BAR access.
>
> Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>