Skip to content

Commit 3691fd1

Browse files
yilin0518Danilo Krummrich
authored andcommitted
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: 9b90864 ("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>
1 parent 68ece1e commit 3691fd1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/kernel/device_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use core::mem::MaybeUninit;
1515
/// # Safety
1616
///
1717
/// Implementers must ensure that `Self` is layout-compatible with [`RawDeviceId::RawType`];
18-
/// i.e. it's safe to transmute to `RawDeviceId`.
18+
/// i.e. it's safe to transmute to `RawType`.
1919
///
2020
/// This requirement is needed so `IdArray::new` can convert `Self` to `RawType` when building
2121
/// the ID table.

0 commit comments

Comments
 (0)