Re: [PATCH v2 00/12] gpu: nova-core: add PRAMIN window support

Miguel Ojeda <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux,dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <CANiq72n9TaUgWgZYg3Xzm2mn3Ed36B7O+f544a5BXik_XUh8FA@mail.gmail.com>
On Mon, Aug 10, 2026 at 3:57 PM Eliot Courtney <[email protected]> wrote:
>
>       rust: num: use const_assert! in Bounded
>       rust: num: reject Bounded::shr overshifts at build time
>       rust: num: add Bounded::shr_exact

Applied to `rust-next` -- thanks everyone!

Alex: I didn't add an implicit Acked-by to the first one but I assume
you are OK with it:

    Suggested-by: Gary Guo <[email protected]>
    Link: https://lore.kernel.org/rust-for-linux/[email protected]/

The second one is actually fairly important so I did:

    [ This implies we can break the type invariant, which in turn means
      we can trigger UB via `Deref`, e.g.:

          rust_kernel: panicked at rust/kernel/num/bounded.rs:528:22:
          unsafe precondition(s) violated: hint::unreachable_unchecked
must never be reached

        - Miguel ]

    Cc: [email protected]
    Fixes: c59a2d14cd24 ("rust: num: add `shr` and `shl` methods to `Bounded`")

Cheers,
Miguel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.