* [PATCH v1] rust: fix typo in #[repr(transparent)] comments
@ 2025-06-23 22:58 FUJITA Tomonori
2025-06-23 23:15 ` Miguel Ojeda
0 siblings, 1 reply; 3+ messages in thread
From: FUJITA Tomonori @ 2025-06-23 22:58 UTC (permalink / raw)
To: alex.gaynor, dakr, gregkh, ojeda, rafael, robh, saravanak
Cc: a.hindborg, aliceryhl, bhelgaas, bjorn3_gh, boqun.feng,
devicetree, gary, kwilczynski, linux-kernel, linux-pci, lossin,
rust-for-linux, tmgross
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] rust: fix typo in #[repr(transparent)] comments
2025-06-23 22:58 [PATCH v1] rust: fix typo in #[repr(transparent)] comments FUJITA Tomonori
@ 2025-06-23 23:15 ` Miguel Ojeda
2025-07-01 9:04 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Miguel Ojeda @ 2025-06-23 23:15 UTC (permalink / raw)
To: FUJITA Tomonori
Cc: alex.gaynor, dakr, gregkh, ojeda, rafael, robh, saravanak,
a.hindborg, aliceryhl, bhelgaas, bjorn3_gh, boqun.feng,
devicetree, gary, kwilczynski, linux-kernel, linux-pci, lossin,
rust-for-linux, tmgross
On Tue, Jun 24, 2025 at 12:59 AM FUJITA Tomonori
<fujita.tomonori@gmail.com> wrote:
>
> 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>
Thanks for fixing the typo!
Looks fine to me.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] rust: fix typo in #[repr(transparent)] comments
2025-06-23 23:15 ` Miguel Ojeda
@ 2025-07-01 9:04 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-07-01 9:04 UTC (permalink / raw)
To: Miguel Ojeda
Cc: FUJITA Tomonori, alex.gaynor, dakr, ojeda, rafael, robh,
saravanak, a.hindborg, aliceryhl, bhelgaas, bjorn3_gh, boqun.feng,
devicetree, gary, kwilczynski, linux-kernel, linux-pci, lossin,
rust-for-linux, tmgross
On Tue, Jun 24, 2025 at 01:15:18AM +0200, Miguel Ojeda wrote:
> On Tue, Jun 24, 2025 at 12:59 AM FUJITA Tomonori
> <fujita.tomonori@gmail.com> wrote:
> >
> > 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>
>
> Thanks for fixing the typo!
>
> Looks fine to me.
Thanks, I'll take this through the driver-core tree.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-01 9:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 22:58 [PATCH v1] rust: fix typo in #[repr(transparent)] comments FUJITA Tomonori
2025-06-23 23:15 ` Miguel Ojeda
2025-07-01 9:04 ` Greg KH
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).