[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2023 17:52:34 -0500
From: Trevor Gross <tmgross@...ch.edu>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: netdev@...r.kernel.org, rust-for-linux@...r.kernel.org, andrew@...n.ch,
miguel.ojeda.sandonis@...il.com, benno.lossin@...ton.me, wedsonaf@...il.com,
aliceryhl@...gle.com, boqun.feng@...il.com
Subject: Re: [PATCH net-next v10 2/4] rust: net::phy add module_phy_driver macro
On Sun, Dec 10, 2023 at 6:50 PM FUJITA Tomonori
<fujita.tomonori@...il.com> wrote:
> +/// kernel::module_phy_driver! {
> +/// drivers: [PhySample],
> +/// device_table: [
> +/// DeviceId::new_with_driver::<PhySample>()
> +/// ],
> +/// name: "rust_sample_phy",
> +/// author: "Rust for Linux Contributors",
> +/// description: "Rust sample PHYs driver",
> +/// license: "GPL",
> +/// }
I still feel that device_table should be an optional field since it is
only rarely different from `drivers`.
But this is not worth blocking on and I can send a follow up patch after merge.
> [...]
> This macro creates an array of kernel's `struct phy_driver` and
> registers it. This also corresponds to the kernel's
> `MODULE_DEVICE_TABLE` macro, which embeds the information for module
> loading into the module binary file.
>
> A PHY driver should use this macro.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@...il.com>
> Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
> Reviewed-by: Benno Lossin <benno.lossin@...ton.me>
Reviewed-by: Trevor Gross <tmgross@...ch.edu>
Powered by blists - more mailing lists