lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <B10A2EE1-C5A7-490F-B85F-82D5C905DE7A@collabora.com>
Date: Thu, 18 Dec 2025 05:41:52 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: Boqun Feng <boqun.feng@...il.com>,
 FUJITA Tomonori <fujita.tomonori@...il.com>,
 Frederic Weisbecker <frederic@...nel.org>,
 Lyude Paul <lyude@...hat.com>,
 Thomas Gleixner <tglx@...utronix.de>,
 Anna-Maria Behnsen <anna-maria@...utronix.de>,
 John Stultz <jstultz@...gle.com>,
 Stephen Boyd <sboyd@...nel.org>,
 Miguel Ojeda <ojeda@...nel.org>,
 Gary Guo <gary@...yguo.net>,
 Björn Roy Baron <bjorn3_gh@...tonmail.com>,
 Benno Lossin <lossin@...nel.org>,
 Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>,
 Danilo Krummrich <dakr@...nel.org>,
 rust-for-linux@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hrtimer: add usage examples to documentation



> On 18 Dec 2025, at 05:36, Andreas Hindborg <a.hindborg@...nel.org> wrote:
> 
> "Daniel Almeida" <daniel.almeida@...labora.com> writes:
> 
> <cut>
> 
>>> 
>>> 
>> 
>> FWIW:
>> 
>> [10:52:46] [PASSED] rust_doctest_kernel_time_hrtimer_rs_0
>> [10:52:46] [PASSED] rust_doctest_kernel_time_hrtimer_rs_1
>> [10:52:46] [PASSED] rust_doctest_kernel_time_hrtimer_rs_2
>> [10:52:46] [PASSED] rust_doctest_kernel_time_hrtimer_rs_3
>> 
>> This looks good to me. The rendering looks ok as well.
>> 
>> With the nits addressed:
>> 
>> Tested-by: Daniel Almeida <daniel.almeida@...labora.com>
>> Reviewed-by: Daniel Almeida <daniel.almeida@...labora.com>
> 
> Thanks for calling out the sloppy error handling, will fix.
> 
> I don't understand what you mean about blanks?


e.g.:


> +//!
> +//!     fn run(
> +//!         this: ArcBorrow<'_, Self>,
> +//!         _ctx: HrTimerCallbackContext<'_, Self>,
> +//!     ) -> HrTimerRestart {
> +//!         pr_info!("Timer called\n");
> +//!         let flag = this.flag.fetch_add(1, ordering::Full);
> +//!         this.cond.complete_all();
> +//!         if flag == 4 {
> +//!             HrTimerRestart::NoRestart
> +//!         } else {
> +//!             HrTimerRestart::Restart
> +//!         }
> +//!     }

There are zero blank lines here and elsewhere. Makes the code harder
to read. I am simply suggesting:


> +//!
> +//!     fn run(
> +//!         this: ArcBorrow<'_, Self>,
> +//!         _ctx: HrTimerCallbackContext<'_, Self>,
> +//!     ) -> HrTimerRestart {
> +//!         pr_info!("Timer called\n");

<blank line>

> +//!         let flag = this.flag.fetch_add(1, ordering::Full);
> +//!         this.cond.complete_all();

<blank line> 

> +//!         if flag == 4 {
> +//!             HrTimerRestart::NoRestart
> +//!         } else {
> +//!             HrTimerRestart::Restart
> +//!         }
> +//!     }

— Daniel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ