Re: [PATCH v5 3/5] rust: add pr_*_ratelimit! macros for printing
From: Miguel Ojeda
Date: Fri Oct 02 2026 - 16:59:21 EST
On Mon, Aug 3, 2026 at 9:30 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> + pub const unsafe fn new_static(name: &'static CStr, interval: i32, burst: i32) -> Self {
> + Self {
> + inner: Opaque::new(bindings::ratelimit_state {
> + lock: kernel::sync::lock::spinlock::raw_spin_lock_unlocked(name),
> + interval,
> + burst,
> + ..pin_init::zeroed()
> + }),
> + }
> + }
Sashiko is right here -- missing `// INVARIANT`.
> + // We don't set `RATELIMIT_MSG_ON_RELEASE`, so the function name parameter is not used.
This seems inverted as well.
I hope that helps!
Cheers,
Miguel