summaryrefslogtreecommitdiff
path: root/rust/kernel/bitmap.rs
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-11-13 07:58:43 +0100
committerIngo Molnar <mingo@kernel.org>2025-11-13 07:58:43 +0100
commitd851f2b2b273363f65d7285b427bedbb6f8290e2 (patch)
tree38ba3c4b0d4251d7063bcd253c9b914a56165428 /rust/kernel/bitmap.rs
parent249092174caa3fe9fb8f7914991a8c0de484bcf8 (diff)
parente9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c (diff)
downloadlinux-next-d851f2b2b273363f65d7285b427bedbb6f8290e2.tar.gz
linux-next-d851f2b2b273363f65d7285b427bedbb6f8290e2.zip
Merge tag 'v6.18-rc5' into objtool/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'rust/kernel/bitmap.rs')
-rw-r--r--rust/kernel/bitmap.rs10
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() }