Re: [PATCH v15 3/3] rust: platform: add resource accessors
From: Miguel Ojeda
Date: Sat Jul 19 2025 - 12:30:10 EST
On Sat, Jul 19, 2025 at 6:19 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> Yeah, we had this in the past -- when I introduced the lint, I just
> went with putting in the middle, e.g. in `rust/kernel/sync/lock.rs`'s
> `do_unlocked`.
>
> It has been fairly confusing, because long ago AFAIU it was not
> intended to be supported, but then they introduced a config option for
> it, and then it was made the default, but there were false positives.
>
> It seems it has been finally fixed in
> https://github.com/rust-lang/rust-clippy/pull/13888 for Rust 1.87.0.
>
> I would say just put it in the middle. The only advantage of using an
> `allow` would be using the "reason" field to say we can move it >=
> 1.87, but if we really want to move it, we can always use a normal
> comment to say so instead.
I have added some information and links about this to
https://github.com/Rust-for-Linux/linux/issues/349.
Cheers,
Miguel