]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rust: fix typo in #[repr(transparent)] comments
authorFUJITA Tomonori <fujita.tomonori@gmail.com>
Mon, 23 Jun 2025 22:58:46 +0000 (07:58 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2025 09:21:04 +0000 (11:21 +0200)
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>
Link: https://lore.kernel.org/r/20250623225846.169805-1-fujita.tomonori@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rust/kernel/driver.rs
rust/kernel/of.rs
rust/kernel/pci.rs

index a4bf4498e592ab301614fb126da205368646eebf..f8dd7593e8dcd487e73758193c35df639bb732a0 100644 (file)
@@ -166,7 +166,7 @@ pub trait Adapter {
             if raw_id.is_null() {
                 None
             } else {
-                // SAFETY: `DeviceId` is a `#[repr(transparent)` wrapper of `struct acpi_device_id`
+                // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `struct acpi_device_id`
                 // and does not add additional invariants, so it's safe to transmute.
                 let id = unsafe { &*raw_id.cast::<acpi::DeviceId>() };
 
@@ -200,7 +200,7 @@ pub trait Adapter {
             if raw_id.is_null() {
                 None
             } else {
-                // SAFETY: `DeviceId` is a `#[repr(transparent)` wrapper of `struct of_device_id`
+                // 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>() };
 
index 04f2d8ef29cb953907ae26b5b2ebce926b6feef2..52fe0c77b9a15b25c3d86a94deeb04443eb1f860 100644 (file)
@@ -13,7 +13,7 @@ pub type IdTable<T> = &'static dyn kernel::device_id::IdTable<DeviceId, T>;
 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 {
index db0eb7eaf9b10c5316366ef16fe722a03044a517..9afe2a8ed637238ea01163e9ba0ef38f1aa742f9 100644 (file)
@@ -67,7 +67,7 @@ impl<T: Driver + 'static> Adapter<T> {
         // 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());
@@ -161,7 +161,7 @@ impl DeviceId {
 }
 
 // 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 {