[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250623225846.169805-1-fujita.tomonori@gmail.com>
Date: Tue, 24 Jun 2025 07:58:46 +0900
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: alex.gaynor@...il.com,
dakr@...nel.org,
gregkh@...uxfoundation.org,
ojeda@...nel.org,
rafael@...nel.org,
robh@...nel.org,
saravanak@...gle.com
Cc: a.hindborg@...nel.org,
aliceryhl@...gle.com,
bhelgaas@...gle.com,
bjorn3_gh@...tonmail.com,
boqun.feng@...il.com,
devicetree@...r.kernel.org,
gary@...yguo.net,
kwilczynski@...nel.org,
linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org,
lossin@...nel.org,
rust-for-linux@...r.kernel.org,
tmgross@...ch.edu
Subject: [PATCH v1] rust: fix typo in #[repr(transparent)] comments
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@...il.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
Powered by blists - more mailing lists