Re: [PATCH v9 2/7] rust: irq: add flags module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux