Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-12 Thread Alexandre Courbot
On Thu Jun 12, 2025 at 11:49 PM JST, Benno Lossin wrote: > On Thu Jun 12, 2025 at 3:27 PM CEST, Alexandre Courbot wrote: >> On Thu Jun 12, 2025 at 10:17 PM JST, Alexandre Courbot wrote: >>> On Wed Jun 4, 2025 at 4:18 PM JST, Benno Lossin wrote: On Wed Jun 4, 2025 at 2:05 AM CEST, Alexandre Cou

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-12 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:27 PM CEST, Alexandre Courbot wrote: > On Thu Jun 12, 2025 at 10:17 PM JST, Alexandre Courbot wrote: >> On Wed Jun 4, 2025 at 4:18 PM JST, Benno Lossin wrote: >>> On Wed Jun 4, 2025 at 2:05 AM CEST, Alexandre Courbot wrote: On Wed Jun 4, 2025 at 8:02 AM JST, Benno Loss

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-12 Thread Alexandre Courbot
On Thu Jun 12, 2025 at 10:17 PM JST, Alexandre Courbot wrote: > On Wed Jun 4, 2025 at 4:18 PM JST, Benno Lossin wrote: >> On Wed Jun 4, 2025 at 2:05 AM CEST, Alexandre Courbot wrote: >>> On Wed Jun 4, 2025 at 8:02 AM JST, Benno Lossin wrote: On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbo

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-12 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 4:18 PM JST, Benno Lossin wrote: > On Wed Jun 4, 2025 at 2:05 AM CEST, Alexandre Courbot wrote: >> On Wed Jun 4, 2025 at 8:02 AM JST, Benno Lossin wrote: >>> On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbot wrote: On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrot

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-04 Thread Benno Lossin
On Wed Jun 4, 2025 at 1:54 AM CEST, Alexandre Courbot wrote: > On Wed Jun 4, 2025 at 7:53 AM JST, Benno Lossin wrote: >> On Mon Jun 2, 2025 at 11:39 AM CEST, Danilo Krummrich wrote: >>> On Thu, May 29, 2025 at 09:27:33AM +0200, Benno Lossin wrote: That's also fair, but we lose the constness of

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-04 Thread Benno Lossin
On Wed Jun 4, 2025 at 2:05 AM CEST, Alexandre Courbot wrote: > On Wed Jun 4, 2025 at 8:02 AM JST, Benno Lossin wrote: >> On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbot wrote: >>> On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrote: On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courb

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 8:02 AM JST, Benno Lossin wrote: > On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbot wrote: >> On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrote: >>> On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courbot wrote: On Thu May 29, 2025 at 5:17 AM JST, Benno Lossin wr

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 7:53 AM JST, Benno Lossin wrote: > On Mon Jun 2, 2025 at 11:39 AM CEST, Danilo Krummrich wrote: >> On Thu, May 29, 2025 at 09:27:33AM +0200, Benno Lossin wrote: >>> That's also fair, but we lose the constness of `next_multiple_of`, so >>> you can't use `align_up` in a const fu

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Benno Lossin
On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbot wrote: > On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrote: >> On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courbot wrote: >>> On Thu May 29, 2025 at 5:17 AM JST, Benno Lossin wrote: On Wed May 21, 2025 at 8:44 AM CEST, Alexandre Cou

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Benno Lossin
On Mon Jun 2, 2025 at 11:39 AM CEST, Danilo Krummrich wrote: > On Thu, May 29, 2025 at 09:27:33AM +0200, Benno Lossin wrote: >> That's also fair, but we lose the constness of `next_multiple_of`, so >> you can't use `align_up` in a const function. That might confuse people >> and then they write the

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-02 Thread Alexandre Courbot
On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrote: > On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courbot wrote: >> On Thu May 29, 2025 at 5:17 AM JST, Benno Lossin wrote: >>> On Wed May 21, 2025 at 8:44 AM CEST, Alexandre Courbot wrote: Introduce the `num` module, featuring the `NumExt

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-02 Thread Danilo Krummrich
On Thu, May 29, 2025 at 09:27:33AM +0200, Benno Lossin wrote: > That's also fair, but we lose the constness of `next_multiple_of`, so > you can't use `align_up` in a const function. That might confuse people > and then they write their own const helper function... I'd prefer we use > all functions

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-29 Thread Benno Lossin
On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courbot wrote: > On Thu May 29, 2025 at 5:17 AM JST, Benno Lossin wrote: >> On Wed May 21, 2025 at 8:44 AM CEST, Alexandre Courbot wrote: >>> Introduce the `num` module, featuring the `NumExt` extension trait >>> that expands unsigned integers with use

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-28 Thread Alexandre Courbot
Hi Alice, On Thu May 29, 2025 at 4:56 AM JST, Alice Ryhl wrote: > On Wed, May 21, 2025 at 8:45 AM Alexandre Courbot wrote: >> >> Introduce the `num` module, featuring the `NumExt` extension trait >> that expands unsigned integers with useful operations for the kernel. >> >> These are to be used b

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-28 Thread Alexandre Courbot
On Thu May 29, 2025 at 5:17 AM JST, Benno Lossin wrote: > On Wed May 21, 2025 at 8:44 AM CEST, Alexandre Courbot wrote: >> Introduce the `num` module, featuring the `NumExt` extension trait >> that expands unsigned integers with useful operations for the kernel. >> >> These are to be used by the no

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-28 Thread Benno Lossin
On Wed May 21, 2025 at 8:44 AM CEST, Alexandre Courbot wrote: > Introduce the `num` module, featuring the `NumExt` extension trait > that expands unsigned integers with useful operations for the kernel. > > These are to be used by the nova-core driver, but they are so ubiquitous > that other driver

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-28 Thread Alice Ryhl
On Wed, May 21, 2025 at 8:45 AM Alexandre Courbot wrote: > > Introduce the `num` module, featuring the `NumExt` extension trait > that expands unsigned integers with useful operations for the kernel. > > These are to be used by the nova-core driver, but they are so ubiquitous > that other drivers

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-22 Thread Alexandre Courbot
On Thu May 22, 2025 at 5:44 PM JST, Miguel Ojeda wrote: > On Thu, May 22, 2025 at 6:01 AM Alexandre Courbot wrote: >> >> Either that, or we enable `#![feature(const_trait_impl)]`. I just tried >> and with it we could indeed define and implement `NumExt` as const, >> which looks like the cleanest w

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-22 Thread Miguel Ojeda
On Thu, May 22, 2025 at 6:01 AM Alexandre Courbot wrote: > > Either that, or we enable `#![feature(const_trait_impl)]`. I just tried > and with it we could indeed define and implement `NumExt` as const, > which looks like the cleanest way to do this to me. Hmm... I think that one is actively bein

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-21 Thread Alexandre Courbot
On Wed May 21, 2025 at 3:44 PM JST, Alexandre Courbot wrote: > Introduce the `num` module, featuring the `NumExt` extension trait > that expands unsigned integers with useful operations for the kernel. > > These are to be used by the nova-core driver, but they are so ubiquitous > that other drivers

[PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-05-20 Thread Alexandre Courbot
Introduce the `num` module, featuring the `NumExt` extension trait that expands unsigned integers with useful operations for the kernel. These are to be used by the nova-core driver, but they are so ubiquitous that other drivers should be able to take advantage of them as well. The currently impl