aboutsummaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorYilin Chen <1479826151@qq.com>2025-12-29 00:53:44 +0800
committerDanilo Krummrich <dakr@kernel.org>2025-12-29 14:09:18 +0100
commit3691fd19ccad4c1c0e3fc4888ef36edaa6e571be (patch)
tree5513db05bfd966ec72e13b33cf59fe1e8ecfb1a4 /rust
parent68ece1e2ce3a1cb0aac9f5af685cf18fa2fa31aa (diff)
rust: device_id: replace incorrect word in safety documentation
The safety documentation incorrectly refers to `RawDeviceId` when transmuting to `RawType`. This fixes the documentation to correctly indicate that implementers must ensure layout compatibility with `RawType`, not `RawDeviceId`. Fixes: 9b90864bb42b ("rust: implement `IdArray`, `IdTable` and `RawDeviceId`") Signed-off-by: Yilin Chen <1479826151@qq.com> Link: https://patch.msgid.link/tencent_C18DD5047749311142ED455779C7CCCF3A08@qq.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust')
-rw-r--r--rust/kernel/device_id.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/device_id.rs b/rust/kernel/device_id.rs
index 62c42da12e9d..8e9721446014 100644
--- a/rust/kernel/device_id.rs
+++ b/rust/kernel/device_id.rs
@@ -15,7 +15,7 @@ use core::mem::MaybeUninit;
/// # Safety
///
/// Implementers must ensure that `Self` is layout-compatible with [`RawDeviceId::RawType`];
-/// i.e. it's safe to transmute to `RawDeviceId`.
+/// i.e. it's safe to transmute to `RawType`.
///
/// This requirement is needed so `IdArray::new` can convert `Self` to `RawType` when building
/// the ID table.