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: <7306618e-8c30-4963-96e6-c0b58a5bd88a@redhat.com>
Date: Thu, 27 Feb 2025 13:41:03 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Arnd Bergmann <arnd@...db.de>, Jijie Shao <shaojijie@...wei.com>,
 Arnd Bergmann <arnd@...nel.org>, Jian Shen <shenjian15@...wei.com>,
 Salil Mehta <salil.mehta@...wei.com>, Andrew Lunn <andrew+netdev@...n.ch>,
 "David S . Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>
Cc: Simon Horman <horms@...nel.org>,
 Uwe Kleine-König <u.kleine-koenig@...libre.com>,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Netdev <netdev@...r.kernel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net: hisilicon: hns_mdio: remove incorrect ACPI_PTR
 annotation

On 2/27/25 1:03 PM, Arnd Bergmann wrote:
> On Thu, Feb 27, 2025, at 12:53, Jijie Shao wrote:
>>
>> if CONFIG_ACPI is disabled, ACPI_PTR() will return NULL, so
>> hns_mdio_acpi_match is unused variable.
>>
>>
>> So use #ifdef is possible and has no side effects, and many drivers do so.
> 
> Those should be cleaned up eventually, but that is separate from
> the build warning.
> 
>> Of course, it also seems possible to remove ACPI_PTR(),
>> But I'm not sure if it's okay to set a value to acpi_match_table if 
>> CONFIG_ACPI is disabled.
> 
> Setting .acpi_match_table and .of_match_table unconditionally
> is the normal case. Historically we had some drivers that
> used of_match_ptr() to assign the .of_match_table in order
> to allow drivers to #ifdef out the CONFIG_OF portion of the
> driver for platforms that did not already use devicetree
> based probing.
> 
> There are basically no platforms left that have not been
> converted to devicetree yet, so there is no point in
> micro-optimizing the kernel size for that case, but the
> (mis)use of of_match_ptr() has been copied into drivers
> after that, and most of the ACPI_PTR() users unfortunately
> copied from that when drivers started supporting both.

Makes sense, thanks!

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ