Re: [PATCH v2 01/31] rust: pci: add domain_nr() accessor
Miguel Ojeda <[email protected]>
| Newsgroups | dev.linux.lists.nova-gpu,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CANiq72=Loa21e-pywymk+KcQ+8p8NuqYQc79XDKduQh6f8TnxQ@mail.gmail.com> |
On Sat, Aug 22, 2026 at 3:55 AM John Hubbard <[email protected]> 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