lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLgjWZ+yBf6YgdA8e7BbRkzp9Lrf4OXPa92uZDp4jVc6_rg@mail.gmail.com>
Date: Mon, 30 Sep 2024 15:49:06 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: netdev@...r.kernel.org, rust-for-linux@...r.kernel.org, andrew@...n.ch, 
	hkallweit1@...il.com, tmgross@...ch.edu
Subject: Re: [PATCH net-next v1] rust: net::phy always define device_table in
 module_phy_driver macro

On Mon, Sep 30, 2024 at 3:41 PM FUJITA Tomonori
<fujita.tomonori@...il.com> wrote:
>
> device_table in module_phy_driver macro is defined only when the
> driver is built as a module. So a PHY driver imports phy::DeviceId
> module in the following way then hits `unused import` warning when
> it's compiled as built-in:
>
>  use kernel::net::phy::DeviceId;
>
>  kernel::module_phy_driver! {
>      drivers: [PhyQT2025],
>      device_table: [
>         DeviceId::new_with_driver::<PhyQT2025>(),
>      ],
>
> Put device_table in a const. It's not included in the kernel image if
> unused (when the driver is compiled as built-in), and the compiler
> doesn't complain.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@...il.com>

Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ