Skip to contentSkip to conversation

rust: time: remove leftover "clock source" wording from doc comments

PATCH In review FUJITA Tomonori 3 participants 3 messages Oct 30

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: time: remove leftover "clock source" wording from doc comments

From: FUJITA Tomonori <[email protected]>

Commit 6a8e2c63f2fe ("rust: time: rename ClockSource trait to ClockId") renamed the trait because it represents a clockid_t, not the C struct clocksource. Two doc comments still say "clock source".

Replace them with "clock". This matches the ClockId doc ("Get the current time from the clock") and the C hrtimer_setup() kerneldoc ("@clock_id: the clock to be used").

No functional change.

---
 rust/kernel/time.rs         | 2 +-
 rust/kernel/time/hrtimer.rs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
rust/kernel/time.rs +1 -1
index b6a2aab12a50..09b682ac4755 100644
@@ -198,7 +198,7 @@ fn clone(&self) -> Self {
 impl<C: ClockId> Copy for Instant<C> {}
 
 impl<C: ClockId> Instant<C> {
-    /// Get the current time from the clock source.
+    /// Get the current time from the clock `C`.
     #[inline]
     pub fn now() -> Self {
         // INVARIANT: The `ClockId::ktime_get()` function returns a value in the range
rust/kernel/time/hrtimer.rs +1 -1
index c0180b8ca5d3..24e508d8f11d 100644
@@ -904,7 +904,7 @@ pub trait HrTimerMode: private::Sealed {
     /// The C representation of hrtimer mode.
     const C_MODE: bindings::hrtimer_mode;
 
-    /// Type representing the clock source.
+    /// The clock to be used by the timer.
     type Clock: ClockId;
 
     /// Type representing the expiration specification (absolute or relative time).

base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8

Signature · 1 line
2.43.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · FUJITA Tomonori

From: FUJITA Tomonori <[email protected]>

Commit 6a8e2c63f2fe ("rust: time: rename ClockSource trait to ClockId") renamed the trait because it represents a clockid_t, not the C struct clocksource. Two doc comments still say "clock source".

Quoted 7 lines

Replace them with "clock". This matches the ClockId doc ("Get the current time from the clock") and the C hrtimer_setup() kerneldoc ("@clock_id: the clock to be used").

No functional change.

FWIW,

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to FUJITA Tomonori
Quoted 6 lines · FUJITA Tomonori

From: FUJITA Tomonori <[email protected]>

Commit 6a8e2c63f2fe ("rust: time: rename ClockSource trait to ClockId") renamed the trait because it represents a clockid_t, not the C struct clocksource. Two doc comments still say "clock source".

Quoted 7 lines

Replace them with "clock". This matches the ClockId doc ("Get the current time from the clock") and the C hrtimer_setup() kerneldoc ("@clock_id: the clock to be used").

No functional change.

Best regards,
Andreas Hindborg