Re: [PATCH 1/2] iio: dac: ad5755: mark OF related data as maybe unused

From: Krzysztof Kozlowski
Date: Tue Aug 15 2023 - 10:05:26 EST


On 11/08/2023 17:33, Jonathan Cameron wrote:
> On Thu, 10 Aug 2023 13:19:32 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote:
>
>> When compile tested with W=1 on x86_64 with driver as built-in:
>>
>> ad5755.c:866:34: error: unused variable 'ad5755_of_match' [-Werror,-Wunused-const-variable]
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
>
> I'd rather see the table used as relying on the fallback path via the spi_match_id table
> is fragile as two tables may not have equivalent entries in the long run.
> Entry missing in the spi_driver.driver structure.
>
> Bonus points for adding the match data to the of table and making them all pointers
> there and in spi_device_id table + using spi_get_device_match_data()

... and now I remember that I already sent such patch some time ago and
you already said this to me. Uh, sorry for sending the same thing again.
I'll fix it in spare time as you described.

Best regards,
Krzysztof