summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/bitmap.rs2
-rw-r--r--rust/kernel/fs/file.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/rust/kernel/bitmap.rs b/rust/kernel/bitmap.rs
index f45915694454..711b8368b38f 100644
--- a/rust/kernel/bitmap.rs
+++ b/rust/kernel/bitmap.rs
@@ -166,6 +166,7 @@ impl core::ops::Deref for BitmapVec {
fn deref(&self) -> &Bitmap {
let ptr = if self.nbits <= BITS_PER_LONG {
// SAFETY: Bitmap is represented inline.
+ #[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`.
@@ -182,6 +183,7 @@ 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.
+ #[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`.
diff --git a/rust/kernel/fs/file.rs b/rust/kernel/fs/file.rs
index cf06e73a6da0..cd6987850332 100644
--- a/rust/kernel/fs/file.rs
+++ b/rust/kernel/fs/file.rs
@@ -448,9 +448,9 @@ impl Drop for FileDescriptorReservation {
}
}
-/// Represents the `EBADF` error code.
+/// Represents the [`EBADF`] error code.
///
-/// Used for methods that can only fail with `EBADF`.
+/// Used for methods that can only fail with [`EBADF`].
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct BadFdError;