rust: hrtimer: Document the return value for HrTimerHandle::cancel()
authorLyude Paul <lyude@redhat.com>
Thu, 21 Aug 2025 19:32:41 +0000 (15:32 -0400)
committerAndreas Hindborg <a.hindborg@kernel.org>
Thu, 4 Sep 2025 14:54:39 +0000 (16:54 +0200)
Just a drive-by fix I noticed: we don't actually document what the return
value from cancel() does, so do that.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/r/20250821193259.964504-2-lyude@redhat.com
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
rust/kernel/time/hrtimer.rs

index 144e3b5..6bfc022 100644 (file)
@@ -324,6 +324,8 @@ pub unsafe trait HrTimerHandle {
     /// Note that the timer might be started by a concurrent start operation. If
     /// so, the timer might not be in the **stopped** state when this function
     /// returns.
+    ///
+    /// Returns `true` if the timer was running.
     fn cancel(&mut self) -> bool;
 }