Re: [PATCH v9 16/31] rust: ptr: add const_align_up()

Miguel Ojeda
2026-04-03T10:02:04Z

On Tue, Mar 31, 2026 at 1:54 PM Danilo Krummrich <dakr@kernel.org> 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