From: Danilo Krummrich <dakr@kernel.org>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: alex.gaynor@gmail.com, gregkh@linuxfoundation.org,
ojeda@kernel.org, rafael@kernel.org, robh@kernel.org,
saravanak@google.com, tmgross@umich.edu, a.hindborg@kernel.org,
aliceryhl@google.com, bhelgaas@google.com,
bjorn3_gh@protonmail.com, boqun.feng@gmail.com,
david.m.ertman@intel.com, devicetree@vger.kernel.org,
gary@garyguo.net, ira.weiny@intel.com, kwilczynski@kernel.org,
lenb@kernel.org, leon@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
lossin@kernel.org, netdev@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v4 1/3] rust: device_id: split out index support into a separate trait
Date: Sat, 12 Jul 2025 00:23:31 +0200 [thread overview]
Message-ID: <a138b3ef-eee9-42bc-b861-e5037f96940e@kernel.org> (raw)
In-Reply-To: <20250711040947.1252162-2-fujita.tomonori@gmail.com>
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.
> }
> }
> }
next prev parent reply other threads:[~2025-07-11 22:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 4:09 [PATCH v4 0/3] rust: Build PHY device tables by using module_device_table macro FUJITA Tomonori
2025-07-11 4:09 ` [PATCH v4 1/3] rust: device_id: split out index support into a separate trait FUJITA Tomonori
2025-07-11 22:23 ` Danilo Krummrich [this message]
2025-07-16 9:19 ` Greg KH
2025-07-11 4:09 ` [PATCH v4 2/3] rust: net::phy represent DeviceId as transparent wrapper over mdio_device_id FUJITA Tomonori
2025-07-11 4:09 ` [PATCH v4 3/3] rust: net::phy Change module_phy_driver macro to use module_device_table macro FUJITA Tomonori
2025-07-11 22:19 ` [PATCH v4 0/3] rust: Build PHY device tables by using " Danilo Krummrich
2025-07-11 22:53 ` FUJITA Tomonori
2025-07-14 13:22 ` Danilo Krummrich
2025-07-16 22:58 ` Danilo Krummrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a138b3ef-eee9-42bc-b861-e5037f96940e@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bhelgaas@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=david.m.ertman@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=kwilczynski@kernel.org \
--cc=lenb@kernel.org \
--cc=leon@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=saravanak@google.com \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).