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] [day] [month] [year] [list]
Message-ID: <87ike4uoaq.fsf@t14s.mail-host-address-is-not-set>
Date: Thu, 18 Dec 2025 10:33:49 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: Daniel Almeida <daniel.almeida@...labora.com>
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

"Daniel Almeida" <daniel.almeida@...labora.com> writes:

>> 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
>> +//!         }
>> +//!     }

Ah, thanks for explaining. I was looking around for blank lines that was
maybe not supposed to be there.

I can sprinkle blank lines around, no problem 👍


Best regards,
Andreas Hindborg




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ