Re: [PATCH v3 1/6] rust: add warn_on_err macro

Miguel Ojeda
2026-04-26T13:30:58Z

On Wed, Apr 22, 2026 at 3:41 PM Alexandre Courbot <acourbot@nvidia.com> wrote:
>
> While we already have the `warn_on` macro, a common usage pattern in
> Rust is to check whether a `Result` is an error. Add a helper macro that
> allows this.
>
> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

I saw the discussion with Gary in v2 -- not sure if you are still
putting this in. If so, and assuming Gary is OK with it, I guess it is
fine as-is for now, but we should probably create at least a (good
first?) issue:

Acked-by: Miguel Ojeda <ojeda@kernel.org>

Not sure about Sashiko's report -- it may be nice to make the macro
more transparent, even if it would be rare to use it with expressions
where it would matter.

Thanks!

Cheers,
Miguel