[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250826.215858.1769736032643857907.fujita.tomonori@gmail.com>
Date: Tue, 26 Aug 2025 21:58:58 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: lyude@...hat.com
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de, a.hindborg@...nel.org, fujita.tomonori@...il.com,
boqun.feng@...il.com, frederic@...nel.org, anna-maria@...utronix.de,
jstultz@...gle.com, sboyd@...nel.org, ojeda@...nel.org,
alex.gaynor@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com,
lossin@...nel.org, aliceryhl@...gle.com, tmgross@...ch.edu, dakr@...nel.org
Subject: Re: [PATCH v3 2/2] rust: time: Implement basic arithmetic
operations for Delta
On Wed, 20 Aug 2025 16:26:44 -0400
Lyude Paul <lyude@...hat.com> wrote:
> 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: FUJITA Tomonori <fujita.tomonori@...il.com>
Powered by blists - more mailing lists