[PATCH v5 1/7] rust: hrtimer: Document the return value for HrTimerHandle::cancel()

Lyude Paul posted 7 patches 3 months, 4 weeks ago
There is a newer version of this series
[PATCH v5 1/7] rust: hrtimer: Document the return value for HrTimerHandle::cancel()
Posted by Lyude Paul 3 months, 4 weeks ago
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>

---
V4:
* Reword to "Returns `true` if the timer was running."

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 rust/kernel/time/hrtimer.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rust/kernel/time/hrtimer.rs b/rust/kernel/time/hrtimer.rs
index 3980a7c5f7dbe..294f257ef5c5a 100644
--- a/rust/kernel/time/hrtimer.rs
+++ b/rust/kernel/time/hrtimer.rs
@@ -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;
 }
 
-- 
2.49.0
Re: [PATCH v5 1/7] rust: hrtimer: Document the return value for HrTimerHandle::cancel()
Posted by Andreas Hindborg 3 months, 3 weeks ago
"Lyude Paul" <lyude@redhat.com> writes:

> 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>


Best regards,
Andreas Hindborg