Re: [PATCH v5 21/38] rust: ptr: add const_align_up() and enable inline_const feature

From: Miguel Ojeda

Date: Sat Feb 21 2026 - 15:51:01 EST


On Sat, Feb 21, 2026 at 3:11 AM John Hubbard <jhubbard@xxxxxxxxxx> wrote:
>
> [1] https://lore.kernel.org/rust-for-linux/20260206171253.2704684-2-gary@xxxxxxxxxx/

Link: https://lore.kernel.org/rust-for-linux/20260206171253.2704684-2-gary@xxxxxxxxxx/
[1]

> +pub const fn const_align_up<const ALIGN: usize>(value: usize) -> usize {

Ah, I thought you wanted to put this in `drivers/gpu/nova-core/num.rs`
like in the previous version.

If it is here instead, then you shouldn't need the
`rust_allowed_features` change anymore, because we already enable
`inline_const` in the `kernel` crate.

> diff --git a/scripts/Makefile.build b/scripts/Makefile.build

Having said that, if you do end up needing it elsewhere, then please
add the other line added by Gary's patch, i.e.:

+# - Stable since Rust 1.79.0: `feature(inline_const)`.

Thanks!

Cheers,
Miguel