diff options
| author | Alice Ryhl <aliceryhl@google.com> | 2025-10-20 11:45:04 +0000 |
|---|---|---|
| committer | Alice Ryhl <aliceryhl@google.com> | 2025-10-20 11:49:19 +0000 |
| commit | 91321980923477044eaf91ca6445a409c4b9712e (patch) | |
| tree | c2d24d9bcad6bec4387115527b645b30a8d3bd0b /rust/kernel/bitmap.rs | |
| parent | 63e919a31625d5d2878cfc2511274826e29336b2 (diff) | |
| parent | 211ddde0823f1442e4ad052a2f30f050145ccada (diff) | |
Merge tag 'v6.18-rc2' into 'drm-rust-next'
When pushing commits to drm-rust-next, we need to verify that the
patches pass rustfmt. Thus, pull in v6.18-rc2 for its rustfmt fix.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Diffstat (limited to 'rust/kernel/bitmap.rs')
| -rw-r--r-- | rust/kernel/bitmap.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rust/kernel/bitmap.rs b/rust/kernel/bitmap.rs index f45915694454..aa8fc7bf06fc 100644 --- a/rust/kernel/bitmap.rs +++ b/rust/kernel/bitmap.rs @@ -166,7 +166,10 @@ impl core::ops::Deref for BitmapVec { fn deref(&self) -> &Bitmap { let ptr = if self.nbits <= BITS_PER_LONG { // SAFETY: Bitmap is represented inline. - unsafe { core::ptr::addr_of!(self.repr.bitmap) } + #[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")] + unsafe { + core::ptr::addr_of!(self.repr.bitmap) + } } else { // SAFETY: Bitmap is represented as array of `unsigned long`. unsafe { self.repr.ptr.as_ptr() } @@ -182,7 +185,10 @@ impl core::ops::DerefMut for BitmapVec { fn deref_mut(&mut self) -> &mut Bitmap { let ptr = if self.nbits <= BITS_PER_LONG { // SAFETY: Bitmap is represented inline. - unsafe { core::ptr::addr_of_mut!(self.repr.bitmap) } + #[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")] + unsafe { + core::ptr::addr_of_mut!(self.repr.bitmap) + } } else { // SAFETY: Bitmap is represented as array of `unsigned long`. unsafe { self.repr.ptr.as_ptr() } |
