diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2025-10-13 02:14:22 +0200 |
---|---|---|
committer | Yury Norov (NVIDIA) <yury.norov@gmail.com> | 2025-10-15 10:39:54 -0400 |
commit | 0f5878834d6ce97426219b64c02a2c4081419d53 (patch) | |
tree | 18e02a6f9f67dcb4d55bb521752bbfd6f0008018 /drivers/clocksource/hyperv_timer.c | |
parent | 9b332cece987ee1790b2ed4c989e28162fa47860 (diff) |
rust: bitmap: clean Rust 1.92.0 `unused_unsafe` warning
Starting with Rust 1.92.0 (expected 2025-12-11), Rust allows to safely
take the address of a union field [1][2]:
CLIPPY L rust/kernel.o
error: unnecessary `unsafe` block
--> rust/kernel/bitmap.rs:169:13
|
169 | unsafe { core::ptr::addr_of!(self.repr.bitmap) }
| ^^^^^^ unnecessary `unsafe` block
|
= note: `-D unused-unsafe` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_unsafe)]`
error: unnecessary `unsafe` block
--> rust/kernel/bitmap.rs:185:13
|
185 | unsafe { core::ptr::addr_of_mut!(self.repr.bitmap) }
| ^^^^^^ unnecessary `unsafe` block
Thus allow both instances to clean the warning in newer compilers.
Link: https://github.com/rust-lang/rust/issues/141264 [1]
Link: https://github.com/rust-lang/rust/pull/141469 [2]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Diffstat (limited to 'drivers/clocksource/hyperv_timer.c')
0 files changed, 0 insertions, 0 deletions