diff options
-rw-r--r-- | rust/kernel/driver.rs | 4 | ||||
-rw-r--r-- | rust/kernel/of.rs | 2 | ||||
-rw-r--r-- | rust/kernel/pci.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/rust/kernel/driver.rs b/rust/kernel/driver.rs index a4bf4498e592..f8dd7593e8dc 100644 --- a/rust/kernel/driver.rs +++ b/rust/kernel/driver.rs @@ -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>() }; diff --git a/rust/kernel/of.rs b/rust/kernel/of.rs index 04f2d8ef29cb..52fe0c77b9a1 100644 --- a/rust/kernel/of.rs +++ b/rust/kernel/of.rs @@ -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 { diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index db0eb7eaf9b1..9afe2a8ed637 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -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 { |