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: <e3deb29a-9468-a937-b95f-ace165aa8085@linaro.org>
Date:   Sun, 12 Mar 2023 11:17:05 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Jonathan Cameron <jic23@...nel.org>
Cc:     Marek Vasut <marek.vasut@...il.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Robert Eshleman <bobbyeshleman@...il.com>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] iio: proximity: sx9500: Mark ACPI and OF related data
 as maybe unused

On 11/03/2023 19:44, Jonathan Cameron wrote:
> On Sat, 11 Mar 2023 13:30:01 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:
> 
>> On 11/03/2023 13:28, Jonathan Cameron wrote:
>>> On Sat, 11 Mar 2023 12:14:57 +0100
>>> Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:
>>>   
>>>> The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making
>>>> certain data unused:
>>>>
>>>>   drivers/iio/proximity/sx9500.c:1039:34: error: ‘sx9500_of_match’ defined but not used [-Werror=unused-const-variable=]
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>  
>>>
>>> Hi Krysztof
>>>
>>> Thanks for looking at these warnings. 
>>>
>>> Drop the protection macros instead.  The tables are trivial in size and
>>> the of_match_ptr() breaks some ways this driver can be used.
>>> ACPI_PTR() isn't as bad, but is pretty much pointless given this size of
>>> the array. 
>>>   
>>
>> For ACPI platform, ACPI table is used, so nothing for PRP0001. For OF
>> platform, OF table is used.
> 
> So you would think, but nope.. That's not how it works (I was surprised
> when I came across this the first time too)
>  
> PRP0001 is magic and requires no specific support in an individual
> driver beyond not using that of_match_ptr() macro!

I know, we talk about ACPI table.

> 
> https://elixir.bootlin.com/linux/latest/source/drivers/acpi/bus.c#L754
> Docs here
> https://elixir.bootlin.com/linux/latest/source/Documentation/firmware-guide/acpi/enumeration.rst#L450

The code is compile when CONFIG_ACPI is defined, right? Then you have
ACPI table, so what for ACPI platform is missing? ACPI platform has ACPI
table.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ