rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: FUJITA Tomonori <fujita.tomonori@gmail.com>
To: alex.gaynor@gmail.com, dakr@kernel.org,
	gregkh@linuxfoundation.org, ojeda@kernel.org, rafael@kernel.org,
	robh@kernel.org, saravanak@google.com
Cc: a.hindborg@kernel.org, aliceryhl@google.com, bhelgaas@google.com,
	bjorn3_gh@protonmail.com, boqun.feng@gmail.com,
	devicetree@vger.kernel.org, gary@garyguo.net,
	kwilczynski@kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, lossin@kernel.org,
	rust-for-linux@vger.kernel.org, tmgross@umich.edu
Subject: [PATCH v1] rust: fix typo in #[repr(transparent)] comments
Date: Tue, 24 Jun 2025 07:58:46 +0900	[thread overview]
Message-ID: <20250623225846.169805-1-fujita.tomonori@gmail.com> (raw)

Fix a typo in several comments where `#[repr(transparent)]` was
mistakenly written as `#[repr(transparent)` (missing closing
bracket).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
---
 rust/kernel/driver.rs | 2 +-
 rust/kernel/of.rs     | 2 +-
 rust/kernel/pci.rs    | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rust/kernel/driver.rs b/rust/kernel/driver.rs
index ec9166cedfa7..de4ed5dafa96 100644
--- a/rust/kernel/driver.rs
+++ b/rust/kernel/driver.rs
@@ -159,7 +159,7 @@ fn of_id_info(dev: &device::Device) -> Option<&'static Self::IdInfo> {
         if raw_id.is_null() {
             None
         } else {
-            // SAFETY: `DeviceId` is a `#[repr(transparent)` wrapper of `struct of_device_id` and
+            // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `struct of_device_id` and
             // does not add additional invariants, so it's safe to transmute.
             let id = unsafe { &*raw_id.cast::<of::DeviceId>() };
 
diff --git a/rust/kernel/of.rs b/rust/kernel/of.rs
index 40d1bd13682c..cca3d5cfaa92 100644
--- a/rust/kernel/of.rs
+++ b/rust/kernel/of.rs
@@ -13,7 +13,7 @@
 pub struct DeviceId(bindings::of_device_id);
 
 // SAFETY:
-// * `DeviceId` is a `#[repr(transparent)` wrapper of `struct of_device_id` and does not add
+// * `DeviceId` is a `#[repr(transparent)]` wrapper of `struct of_device_id` and does not add
 //   additional invariants, so it's safe to transmute to `RawType`.
 // * `DRIVER_DATA_OFFSET` is the offset to the `data` field.
 unsafe impl RawDeviceId for DeviceId {
diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs
index f6b19764ad17..dc1516ce0bdc 100644
--- a/rust/kernel/pci.rs
+++ b/rust/kernel/pci.rs
@@ -68,7 +68,7 @@ extern "C" fn probe_callback(
         // INVARIANT: `pdev` is valid for the duration of `probe_callback()`.
         let pdev = unsafe { &*pdev.cast::<Device<device::Core>>() };
 
-        // SAFETY: `DeviceId` is a `#[repr(transparent)` wrapper of `struct pci_device_id` and
+        // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `struct pci_device_id` and
         // does not add additional invariants, so it's safe to transmute.
         let id = unsafe { &*id.cast::<DeviceId>() };
         let info = T::ID_TABLE.info(id.index());
@@ -162,7 +162,7 @@ pub const fn from_class(class: u32, class_mask: u32) -> Self {
 }
 
 // SAFETY:
-// * `DeviceId` is a `#[repr(transparent)` wrapper of `pci_device_id` and does not add
+// * `DeviceId` is a `#[repr(transparent)]` wrapper of `pci_device_id` and does not add
 //   additional invariants, so it's safe to transmute to `RawType`.
 // * `DRIVER_DATA_OFFSET` is the offset to the `driver_data` field.
 unsafe impl RawDeviceId for DeviceId {

base-commit: dc35ddcf97e99b18559d0855071030e664aae44d
-- 
2.43.0


             reply	other threads:[~2025-06-23 22:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 22:58 FUJITA Tomonori [this message]
2025-06-23 23:15 ` [PATCH v1] rust: fix typo in #[repr(transparent)] comments Miguel Ojeda
2025-07-01  9:04   ` Greg KH

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=20250623225846.169805-1-fujita.tomonori@gmail.com \
    --to=fujita.tomonori@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=saravanak@google.com \
    --cc=tmgross@umich.edu \
    /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).