Re: [PATCH v9 2/7] rust: irq: add flags module
From: Miguel Ojeda
Date: Sat Aug 16 2025 - 13:42:45 EST
On Fri, Aug 15, 2025 at 3:24 PM Daniel Almeida
<daniel.almeida@xxxxxxxxxxxxx> wrote:
>
> This is just a way to validate the cast at build time. IMHO, regardless of
> whether this can possibly trigger, it's always nice to err on the side of
> caution, specially because this type doesn't have a fixed bit width.
But this could be an `static_assert!` -- no need to use the `value`, no?
In fact, we could have this cast provided somewhere, like `.into()`,
since it will always work as expected within the kernel.
Cheers,
Miguel