Re: [PATCH v2 01/31] rust: pci: add domain_nr() accessor
From: Miguel Ojeda
Date: Sat Aug 22 2026 - 03:58:09 EST
On Sat, Aug 22, 2026 at 3:55 AM John Hubbard <jhubbard@xxxxxxxxxx> wrote:
>
> + // CAST: The C function returns `int`, but a PCI domain number is always
> + // non-negative, so this cast will not lose any information.
> + domain_nr as u32
What about
debug_assert!(domain_nr >= 0);
?
Cheers,
Miguel