[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a138b3ef-eee9-42bc-b861-e5037f96940e@kernel.org>
Date: Sat, 12 Jul 2025 00:23:31 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: alex.gaynor@...il.com, gregkh@...uxfoundation.org, ojeda@...nel.org,
rafael@...nel.org, robh@...nel.org, saravanak@...gle.com, tmgross@...ch.edu,
a.hindborg@...nel.org, aliceryhl@...gle.com, bhelgaas@...gle.com,
bjorn3_gh@...tonmail.com, boqun.feng@...il.com, david.m.ertman@...el.com,
devicetree@...r.kernel.org, gary@...yguo.net, ira.weiny@...el.com,
kwilczynski@...nel.org, lenb@...nel.org, leon@...nel.org,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, lossin@...nel.org, netdev@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v4 1/3] rust: device_id: split out index support into a
separate trait
On 7/11/25 6:09 AM, FUJITA Tomonori wrote:
> diff --git a/rust/kernel/driver.rs b/rust/kernel/driver.rs
> index f8dd7593e8dc..a8f2675ba7a7 100644
> --- a/rust/kernel/driver.rs
> +++ b/rust/kernel/driver.rs
> @@ -170,7 +170,7 @@ fn acpi_id_info(dev: &device::Device) -> Option<&'static Self::IdInfo> {
> // and does not add additional invariants, so it's safe to transmute.
> let id = unsafe { &*raw_id.cast::<acpi::DeviceId>() };
>
> - Some(table.info(<acpi::DeviceId as crate::device_id::RawDeviceId>::index(id)))
> + Some(table.info(<acpi::DeviceId as crate::device_id::RawDeviceIdIndex>::index(id)))
> }
> }
> }
> @@ -204,7 +204,11 @@ fn of_id_info(dev: &device::Device) -> Option<&'static Self::IdInfo> {
> // and does not add additional invariants, so it's safe to transmute.
> let id = unsafe { &*raw_id.cast::<of::DeviceId>() };
>
> - Some(table.info(<of::DeviceId as crate::device_id::RawDeviceId>::index(id)))
> + Some(
> + table.info(<of::DeviceId as crate::device_id::RawDeviceIdIndex>::index(
> + id,
> + )),
> + )
Just in case someone wonders why this is weirdly formatted, while the acpi one
above is a single line, this seems to be a bug in rustfmt.
> }
> }
> }
Powered by blists - more mailing lists