summaryrefslogtreecommitdiff
path: root/rust/kernel/bitmap.rs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-27 08:33:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-27 08:33:01 +0100
commitd518ec2cbcac1c1175563a115f5024eeb6b4cd8d (patch)
treec463798d8b6c7c7c8372413bf99c1a1a02ef6cf0 /rust/kernel/bitmap.rs
parentbe83d83664e9f6fa035e96fb9187f9e7898659e4 (diff)
parentdcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa (diff)
Merge 6.18-rc3 into usb-next
We need the USB fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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() }