On Sat, 28 Jun 2025 14:18:53 +0200 Miguel Ojeda miguel.ojeda.sandonis@gmail.com wrote:
On Sat, Jun 28, 2025 at 12:30 PM Onur work@onurozkan.dev wrote:
It doesn't seem to be the same reason. I rebased over c6af9a1191d042839e56abff69e8b0302d117988 (the exact commit where that lint was added) but still Clippy did not complain about it on the MSRV. So it was either a leftover, or there is a version between 1.78 and the current stable where Clippy did complain. I can dig into it more during the week if you would like.
Are you sure? The lint is actually disabled, as I mention in 5e7c9b84ad08.
From a quick test, I enabled it in that file, and I get the warning.
Thus it seems to me Clippy would still complain about it just fine.
Yes, I am sure. Just to clarify, I am not testing 5e7c9b84ad08. I am testing c6af9a1191d042839e56abff69e8b0302d117988 where `#[allow(clippy::non_send_fields_in_send_ty)]` was added on `unsafe impl<T: Driver> Send for Registration<T> {}`.
Switching from `allow` to `expect` produced the following result on my end:
``` $ make LLVM=1 -j $(nproc) CLIPPY=1 DESCEND objtool CALL scripts/checksyscalls.sh INSTALL libsubcmd_headers CLIPPY L rust/kernel.o error: this lint expectation is unfulfilled --> rust/kernel/cpufreq.rs:908:10 | 908 | #[expect(clippy::non_send_fields_in_send_ty)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D unfulfilled-lint-expectations` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unfulfilled_lint_expectations)]`
error: aborting due to 1 previous error
make[2]: *** [rust/Makefile:534: rust/kernel.o] Error 1 make[1]: *** [/home/nimda/devspace/onur-ozkan/linux/Makefile:1283: prepare] Error 2 make: *** [Makefile:248: __sub-make] Error 2
$ git log -1 commit c6af9a1191d042839e56abff69e8b0302d117988 (HEAD -> master) Author: Viresh Kumar viresh.kumar@linaro.org Date: Wed Jan 24 12:36:33 2024 +0530
rust: cpufreq: Extend abstractions for driver registration
Extend the cpufreq abstractions to support driver registration from Rust.
Reviewed-by: Danilo Krummrich dakr@kernel.org Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
$ rustc --version --verbose rustc 1.78.0 (9b00956e5 2024-04-29) binary: rustc commit-hash: 9b00956e56009bab2aa15d7bff10916599e3d6d6 commit-date: 2024-04-29 host: x86_64-unknown-linux-gnu release: 1.78.0 LLVM version: 18.1.2 ```
Regards, Onur