[PATCH v1 1/2] rust: time: Rename Delta's methods as_micros_ceil and as_millis
From: FUJITA Tomonori
Date: Tue Jun 17 2025 - 10:42:49 EST
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@xxxxxxxxx>
---
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