Re: [PATCH v9 16/31] rust: ptr: add const_align_up()
From: Miguel Ojeda
Date: Fri Apr 03 2026 - 06:08:40 EST
On Tue, Mar 31, 2026 at 1:54 PM Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> For the stuff I maintain I generally tell people to follow the kernel import
> style in examples as well. Especially when the imports are part of the example,
> as it would be teaching people the wrong thing otherwise.
>
> I.e. it would be a bit odd if an example illustrates the wrong thing.
>
> If they are hidden it depends a bit, and for some cases, like the one you
> mentioned, it might make sense to keep it concise.
>
> But in the case of this patch the imports are part of the example (i.e. not
> hidden), so they should follow the usual kernel rules.
Thanks for the feedback!
For context for others: we also talked about it in one of the Rust for
Linux calls, and for now, at least for visible (i.e. non-hidden with
`#`) imports, we will follow the usual style.
So adjusted in the patch.
Cheers,
Miguel