Re: [PATCH v5 1/2] rust: kernel: create `overflow_assert!` macro
From: Miguel Ojeda
Date: Mon Jun 22 2026 - 05:47:22 EST
Hi Antonio,
Someone asked about this old issue in GitHub -- let me take the chance
to give a couple comments to resurrect this series...
On Tue, Aug 19, 2025 at 2:39 AM Antonio Hickey
<contact@xxxxxxxxxxxxxxxxx> wrote:
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1159
It seems you didn't reorder the tags as mentioned in v4? Was there a
reason for that?
> +/// This macro only has effect when `CONFIG_RUST_OVERFLOW_CHECKS`
> +/// is enabled, otherwise it expands to a no-op.
This is not exactly true anymore, no? i.e. it was true back before you
changed the approach to use `cfg!`, but now some code will be emitted,
even if discarded later.
I would just add " if `CONFIG_RUST_OVERFLOW_CHECKS` is enabled." in
the title (i.e. first paragraph), and remove this paragraph here.
Which is good, because it also means the important bit (i.e. the
`CONFIG_` part that decides when it is enabled) is in the title, not
buried in the third paragraph.
If you can fix that and send a rebased v6, then it would be good (and
you will get a Sashiko review by doing so, too! :)
Thanks!
Cheers,
Miguel