Re: [PATCH v5 1/2] rust: kernel: create `overflow_assert!` macro
From: Miguel Ojeda
Date: Sat Jun 27 2026 - 10:28:59 EST
On Sat, Jun 27, 2026 at 3:19 PM Antonio Hickey
<contact@xxxxxxxxxxxxxxxxx> wrote:
>
> I don't see any valid reason other than just naively missing this on my
> end, but I'll make sure my v6 reorders the tags as mentioned.
No worries :) I was just curious (i.e. sometimes when reviewing what
changed, it is hard to say if there was a reason why something did not
happen).
> As I'm re-reviewing my patch for a v6, what are your thought's on this
> example in the doc's of the macro?
>
> My main worry is the placeholder comments make the example seem
> incomplete, or are these kind of partial function examples normal?
I think it is fine, i.e. we aim for clarity, and I think the "proceed
to grow/append" is clear enough.
Of course, if you can think of a better example that is both complete
but small enough (i.e. without a lot of boilerplate), that is also
good.
Perhaps add a newline before that comment, so that it is even clearer
that it would be code that go after the early checks. Also the first
comment could perhaps be
// If enabled, these will catch overflow errors early:"
(Maybe -- not a native speaker)
Thanks for coming back to this!
Cheers,
Miguel