Re: [PATCH v7 16/31] rust: ptr: add const_align_up()

From: Alice Ryhl

Date: Fri Mar 20 2026 - 05:48:30 EST


On Tue, Mar 17, 2026 at 11:54 PM John Hubbard <jhubbard@xxxxxxxxxx> wrote:
>
> Add const_align_up() to kernel::ptr as the const-compatible equivalent
> of Alignable::align_up().
>
> Suggested-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> Suggested-by: Gary Guo <gary@xxxxxxxxxxx>
> Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>

I think it would be nice to implement the trait versions of this in
terms of this method, so we only have one implementation.

Alice