Re: [PATCH] rust: page: Simplify overflow check using checked_add()
From: Kari Argillander
Date: Sat Dec 20 2025 - 07:53:59 EST
On 20.12.2025 10.41 Dirk Behme (dirk.behme@xxxxxxxxx) wrote:
>
> On 19.12.25 22:29, Kari Argillander wrote:
> > Option::is_none_or() would be nicer, but it requires Rust 1.82; the
> > kernel currently targets 1.78.
> >
>
> I just wonder if we would like to add a comment like
>
> // TODO: replace `map_or` with `is_none_or` once the MSRV is >= 1.82.
>
> like we do in e.g. transmute.rs [2]?
Sure, I can do that. I’ll send a respin maybe next Tuesday.
> [2]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/rust/kernel/transmute.rs#n75