mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.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,
	"Daniel Almeida" <daniel.almeida@collabora.com>
Subject: Re: [PATCH v3] hrtimer: add usage examples to documentation
Date: Mon, 23 Feb 2026 16:28:47 +0100	[thread overview]
Message-ID: <87ldgj32ds.fsf@t14s.mail-host-address-is-not-set> (raw)
In-Reply-To: <87pl5v32z9.fsf@t14s.mail-host-address-is-not-set>

Andreas Hindborg <a.hindborg@kernel.org> writes:

> Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> writes:
>
>> On Fri, Feb 20, 2026 at 9:12 AM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>>>
>>> +//!     prelude::*,
>>
>> The prelude should already be there in examples.
>>
>>> +//!     sync::{
>>> +//!         atomic::{ordering, Atomic},
>>> +//!         completion::Completion,
>>> +//!         Arc,
>>> +//!     },
>>> +//!     time::{
>>> +//!         hrtimer::{
>>> +//!             RelativeMode, HrTimer, HrTimerCallback, HrTimerPointer,
>>> +//!             HrTimerRestart, HrTimerCallbackContext
>>> +//!         },
>>> +//!         Delta, Monotonic,
>>> +//!     },
>>> +//! };
>>
>> This uses a mixture of the vertical style and the horizontal one -- I
>> guess you did it to save on lines, but it looks strange now that we
>> have a style for imports.
>
> It uses random line breaks to make check_patch.pl not yell at me. I
> guess I could copy them somewhere else, do the formatting and copy them
> back. Not really a workflow I care for though.

So, after copying these use statements elsewhere to format them, I was
rereading your message and I see that what you actually write is that
maybe we should be using the vertical style for imports in examples.

The examples would be nothing but a wall of use statements. Do we
really want that? I know it is the style we picked for the kernel in
general, but I don't think it should necessarily apply to the examples.


Best regards,
Andreas Hindborg



  reply	other threads:[~2026-02-23 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20  8:11 Andreas Hindborg
2026-02-20 18:18 ` Miguel Ojeda
2026-02-23 15:15   ` Andreas Hindborg
2026-02-23 15:28     ` Andreas Hindborg [this message]
2026-02-23 15:46       ` Miguel Ojeda
2026-02-23 17:22         ` Andreas Hindborg

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=87ldgj32ds.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=miguel.ojeda.sandonis@gmail.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®