Commit a507f823 authored by Ritvik Gupta's avatar Ritvik Gupta Committed by Viresh Kumar
Browse files

rust: cpumask: Replace `MaybeUninit` and `mem::zeroed` with `Opaque` APIs



Replace the following unsafe initializations:
1. `MaybeUninit::uninit().assume_init()` with `Opaque::uninit()`
2. `core::mem::zeroed()` with `Opaque::zeroed()`

Suggested-by: default avatarBenno Lossin <lossin@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1178


Suggested-by: default avatarAlice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/rust-for-linux/CAH5fLgj0OoCn56OkNUmiPQ=RAVa_VmS-yMZ4TNBSpGPNtZ5D0A@mail.gmail.com/


Reviewed-by: default avatarBenno Lossin <lossin@kernel.org>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Signed-off-by: default avatarRitvik Gupta <ritvikfoss@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 0ae93389
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment