]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: cpufreq: replace `MaybeUninit::zeroed().assume_init()` with `pin_init::zeroed()`
authorBenno Lossin <lossin@kernel.org>
Thu, 14 Aug 2025 09:30:38 +0000 (11:30 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 8 Sep 2025 12:03:29 +0000 (14:03 +0200)
commit4fa9f72d657a76546849068b508a2c82983f8945
tree078931771e75393f4d8975828210d3ad6f55b6cd
parent4846300ba8f9b725594cc2e77785057f536b50c1
rust: cpufreq: replace `MaybeUninit::zeroed().assume_init()` with `pin_init::zeroed()`

All types in `bindings` implement `Zeroable` if they can, so use
`pin_init::zeroed` instead of relying on `unsafe` code.

If this ends up not compiling in the future, something in bindgen or on
the C side changed and is most likely incorrect.

Signed-off-by: Benno Lossin <lossin@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/cpufreq.rs