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: <20240921.041437.1044172886569379842.fujita.tomonori@gmail.com>
Date: Sat, 21 Sep 2024 04:14:37 +0000 (UTC)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: aliceryhl@...gle.com, tmgross@...ch.edu
Cc: fujita.tomonori@...il.com, netdev@...r.kernel.org,
 rust-for-linux@...r.kernel.org, andrew@...n.ch, lkp@...el.com
Subject: Re: [PATCH net] net: phy: qt2025: Fix warning: unused import
 DeviceId

On Fri, 20 Sep 2024 18:00:56 +0200
Alice Ryhl <aliceryhl@...gle.com> wrote:

> Put it in a const. That way it doesn't end up in the image if unused.
> 
> const _TABLE_INIT: [::kernel::bindings::mdio_device_id; 2] = [
>     ::kernel::bindings::mdio_device_id {
>         phy_id: 0x00000001,
>         phy_id_mask: 0xffffffff,
>     },
>     ::kernel::bindings::mdio_device_id {
>         phy_id: 0,
>         phy_id_mask: 0,
>     },
> ];
> 
> #[cfg(MODULE)]
> #[no_mangle]
> static __mod_mdio__phydev_device_table:
> [::kernel::bindings::mdio_device_id; 2] = _TABLE_INIT;

Yeah, `const` works!

Thanks a lot guys! I'll send this change for the next merge window.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ