Re: [PATCH v3] hrtimer: add usage examples to documentation
From: Miguel Ojeda
Date: Mon Feb 23 2026 - 10:50:20 EST
On Mon, Feb 23, 2026 at 4:29 PM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>
> 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.
That is why I asked if we could perhaps merge two pairs of examples :)
i.e. to reduce the "duplicated" boilerplate from the imports, and
perhaps a couple of the items/types that are the same too.
Either that, or you may want to hide them (but I am considering that
we may want to just never hide them (or always doing so) and thus
avoid the discussions that keep coming up on that).
As for using a different style for examples, I can see we could save a
few lines per example, but we would have to remember a different
convention and we would increase the risk of conflicts there (though I
reckon there may be not many conflicts there unlike the module
imports).
Cheers,
Miguel