rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yilin <1479826151@qq.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	yilin <1479826151@qq.com>
Subject: [PATCH 1/3] rust: device_id: replace possible incorrect word in safety document
Date: Thu, 11 Dec 2025 23:17:24 +0800	[thread overview]
Message-ID: <tencent_CBD5D231FBF347232CC155D26A045A3BCF06@qq.com> (raw)
In-Reply-To: <20251211151553.2893838-1-1479826151@qq.com>

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 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


       reply	other threads:[~2025-12-11 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251211151553.2893838-1-1479826151@qq.com>
2025-12-11 15:17 ` yilin [this message]
2025-12-11 15:17 ` [PATCH 2/3] rust: dma: remove incorrect safety documentation yilin
2025-12-11 15:17 ` [PATCH 3/3] rust: cpumask: rename methods of Cpumask for clarity and consistency yilin
2025-12-17 20:35   ` Alice Ryhl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_CBD5D231FBF347232CC155D26A045A3BCF06@qq.com \
    --to=1479826151@qq.com \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).