diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2025-11-11 12:32:07 +0200 |
|---|---|---|
| committer | Jani Nikula <jani.nikula@intel.com> | 2025-11-11 12:32:07 +0200 |
| commit | 1c1960f57151e36f550d1a53352f832d5aaa5f8f (patch) | |
| tree | 102cdd74d069bfcc1c83f99db00ae59f82515c5c /rust/kernel/bitmap.rs | |
| parent | e109f644b871df8440c886a69cdce971ed533088 (diff) | |
| parent | e237dfe70867f02de223e36340fe5f8b0fe0eada (diff) | |
Merge drm/drm-next into drm-intel-next
Primarily sync with the drm_print.h changes from drm-misc.
Signed-off-by: Jani Nikula <jani.nikula@intel.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() } |