[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875xeawi1c.fsf@t14s.mail-host-address-is-not-set>
Date: Tue, 26 Aug 2025 11:26:07 +0200
From: Andreas Hindborg <a.hindborg@...nel.org>
To: Lyude Paul <lyude@...hat.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>, FUJITA
Tomonori <fujita.tomonori@...il.com>
Cc: Boqun Feng <boqun.feng@...il.com>, Frederic Weisbecker
<frederic@...nel.org>, Anna-Maria Behnsen <anna-maria@...utronix.de>, John
Stultz <jstultz@...gle.com>, Stephen Boyd <sboyd@...nel.org>, Miguel Ojeda
<ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Gary Guo
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Benno
Lossin <lossin@...nel.org>, Alice
Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo
Krummrich <dakr@...nel.org>
Subject: Re: [PATCH v3 2/2] rust: time: Implement basic arithmetic
operations for Delta
"Lyude Paul" <lyude@...hat.com> writes:
> While rvkms is only going to be using a few of these, since Deltas are
> basically the same as i64 it's easy enough to just implement all of the
> basic arithmetic operations for Delta types.
>
> Keep in mind there's one quirk here - the kernel has no support for
> i64 % i64 on 32 bit platforms, the closest we have is i64 % i32 through
> div_s64_rem(). So, instead of implementing ops::Rem or ops::RemAssign we
> simply provide Delta::rem_nanos().
>
> Signed-off-by: Lyude Paul <lyude@...hat.com>
Reviewed-by: Andreas Hindborg <a.hindborg@...nel.org>
Best regards,
Andreas Hindborg
Powered by blists - more mailing lists