* [PATCH v1] rust: time: remove leftover "clock source" wording from doc comments
@ 2026-10-30 4:48 FUJITA Tomonori
2026-10-30 5:22 ` Alexandre Courbot
0 siblings, 1 reply; 2+ messages in thread
From: FUJITA Tomonori @ 2026-10-30 4:48 UTC (permalink / raw)
To: a.hindborg, ojeda
Cc: acourbot, aliceryhl, anna-maria, bjorn3_gh, boqun, dakr,
daniel.almeida, frederic, gary, jstultz, lossin, lyude, sboyd,
tamird, tglx, tmgross, work, rust-for-linux, FUJITA Tomonori
From: FUJITA Tomonori <fujita.tomonori@gmail.com>
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.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
---
rust/kernel/time.rs | 2 +-
rust/kernel/time/hrtimer.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/time.rs b/rust/kernel/time.rs
index b6a2aab12a50..09b682ac4755 100644
--- a/rust/kernel/time.rs
+++ b/rust/kernel/time.rs
@@ -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
diff --git a/rust/kernel/time/hrtimer.rs b/rust/kernel/time/hrtimer.rs
index c0180b8ca5d3..24e508d8f11d 100644
--- a/rust/kernel/time/hrtimer.rs
+++ b/rust/kernel/time/hrtimer.rs
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v1] rust: time: remove leftover "clock source" wording from doc comments
2026-10-30 4:48 [PATCH v1] rust: time: remove leftover "clock source" wording from doc comments FUJITA Tomonori
@ 2026-10-30 5:22 ` Alexandre Courbot
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Courbot @ 2026-10-30 5:22 UTC (permalink / raw)
To: FUJITA Tomonori
Cc: a.hindborg, ojeda, aliceryhl, anna-maria, bjorn3_gh, boqun, dakr,
daniel.almeida, frederic, gary, jstultz, lossin, lyude, sboyd,
tamird, tglx, tmgross, work, rust-for-linux, FUJITA Tomonori
On Fri Oct 30, 2026 at 1:48 PM JST, FUJITA Tomonori wrote:
> From: FUJITA Tomonori <fujita.tomonori@gmail.com>
>
> 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.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
FWIW,
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-30 5:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 4:48 [PATCH v1] rust: time: remove leftover "clock source" wording from doc comments FUJITA Tomonori
2026-10-30 5:22 ` Alexandre Courbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox