[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250617144155.3903431-2-fujita.tomonori@gmail.com>
Date: Tue, 17 Jun 2025 23:41:54 +0900
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: a.hindborg@...nel.org,
alex.gaynor@...il.com,
ojeda@...nel.org
Cc: aliceryhl@...gle.com,
anna-maria@...utronix.de,
bjorn3_gh@...tonmail.com,
boqun.feng@...il.com,
dakr@...nel.org,
frederic@...nel.org,
gary@...yguo.net,
jstultz@...gle.com,
linux-kernel@...r.kernel.org,
lossin@...nel.org,
lyude@...hat.com,
rust-for-linux@...r.kernel.org,
sboyd@...nel.org,
tglx@...utronix.de,
tmgross@...ch.edu
Subject: [PATCH v1 1/2] rust: time: Rename Delta's methods as_micros_ceil and as_millis
Rename the Delta struct's methods as_micros_ceil() and as_millis() to
into_micros_ceil() and into_millis() respectively, for consistency
with the naming of other methods.
Fix the commit 2ed94606a0fe ("rust: time: Rename Delta's methods from
as_* to into_*"), wasn't applied as expected, due to the conflict with
the commit 1b7bbd597527 ("rust: time: Avoid 64-bit integer division on
32-bit architectures").
Signed-off-by: FUJITA Tomonori <fujita.tomonori@...il.com>
---
rust/kernel/time.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/time.rs b/rust/kernel/time.rs
index eaa6d9ab5737..445877039395 100644
--- a/rust/kernel/time.rs
+++ b/rust/kernel/time.rs
@@ -284,7 +284,7 @@ pub const fn into_nanos(self) -> i64 {
/// Return the smallest number of microseconds greater than or equal
/// to the value in the [`Delta`].
#[inline]
- pub fn as_micros_ceil(self) -> i64 {
+ pub fn into_micros_ceil(self) -> i64 {
#[cfg(CONFIG_64BIT)]
{
self.into_nanos().saturating_add(NSEC_PER_USEC - 1) / NSEC_PER_USEC
@@ -299,7 +299,7 @@ pub fn as_micros_ceil(self) -> i64 {
/// Return the number of milliseconds in the [`Delta`].
#[inline]
- pub fn as_millis(self) -> i64 {
+ pub fn into_millis(self) -> i64 {
#[cfg(CONFIG_64BIT)]
{
self.into_nanos() / NSEC_PER_MSEC
--
2.43.0
Powered by blists - more mailing lists