mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: "Boqun Feng" <boqun.feng@gmail.com>,
	"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"Lyude Paul" <lyude@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
	"John Stultz" <jstultz@google.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hrtimer: add usage examples to documentation
Date: Thu, 18 Dec 2025 10:33:49 +0100	[thread overview]
Message-ID: <87ike4uoaq.fsf@t14s.mail-host-address-is-not-set> (raw)
In-Reply-To: <B10A2EE1-C5A7-490F-B85F-82D5C905DE7A@collabora.com>

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

>> On 18 Dec 2025, at 05:36, Andreas Hindborg <a.hindborg@kernel.org> wrote:
>>
>> "Daniel Almeida" <daniel.almeida@collabora.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@collabora.com>
>>> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.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




      reply	other threads:[~2025-12-18  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17 10:30 Andreas Hindborg
2025-12-17 14:03 ` Daniel Almeida
2025-12-18  8:36   ` Andreas Hindborg
2025-12-18  8:41     ` Daniel Almeida
2025-12-18  9:33       ` Andreas Hindborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ike4uoaq.fsf@t14s.mail-host-address-is-not-set \
    --to=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=anna-maria@linutronix.de \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=frederic@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®