[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_CBD5D231FBF347232CC155D26A045A3BCF06@qq.com>
Date: Thu, 11 Dec 2025 23:17:24 +0800
From: yilin <1479826151@...com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>
Cc: rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
yilin <1479826151@...com>
Subject: [PATCH 1/3] rust: device_id: replace possible incorrect word in safety document
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`.
Signed-off-by: yilin <1479826151@...com>
---
rust/kernel/device_id.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/device_id.rs b/rust/kernel/device_id.rs
index 62c42da12..8e9721446 100644
--- a/rust/kernel/device_id.rs
+++ b/rust/kernel/device_id.rs
@@ -15,7 +15,7 @@
/// # 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.
--
2.34.1
Powered by blists - more mailing lists