mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rust: device_id: replace possible incorrect word in safety documentation
@ 2025-12-26 16:08 Yilin Chen
  2025-12-27 15:01 ` Kari Argillander
  0 siblings, 1 reply; 2+ messages in thread
From: Yilin Chen @ 2025-12-26 16:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J . Wysocki, Danilo Krummrich, Miguel Ojeda
  Cc: rust-for-linux, linux-kernel, Yilin Chen

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@qq.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 62c42da12e9d..8e9721446014 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rust: device_id: replace possible incorrect word in safety documentation
  2025-12-26 16:08 [PATCH] rust: device_id: replace possible incorrect word in safety documentation Yilin Chen
@ 2025-12-27 15:01 ` Kari Argillander
  0 siblings, 0 replies; 2+ messages in thread
From: Kari Argillander @ 2025-12-27 15:01 UTC (permalink / raw)
  To: Yilin Chen
  Cc: Greg Kroah-Hartman, Rafael J . Wysocki, Danilo Krummrich,
	Miguel Ojeda, rust-for-linux, linux-kernel

Currently subject is

   [PATCH] rust: device_id: replace possible incorrect word in safety
documentation

After this is applied it does not make sense that there read "possible
incorrect". So just remove "possible" from subject.

On Fri, 26 Dec 2025 at 18:09, Yilin Chen <1479826151@qq.com> wrote:
>
> 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@qq.com>

I have said in other patches already but just to be clear use real name
in signed-off-by line.

> ---

On v2 you will have something like this after "---":

Changes in v2:
- Changed subject (Kari Argillander)
- Use real name in signed-off-by line (Kari Argillander)
- Link to v1: https://lore.kernel.org/rust-for-linux/tencent_9F74630DC16B92484463BBC055DEB1F17306@qq.com/

> +++ 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`.


    Argillander

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-27 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-26 16:08 [PATCH] rust: device_id: replace possible incorrect word in safety documentation Yilin Chen
2025-12-27 15:01 ` Kari Argillander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®