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]
Date:   Fri, 11 Aug 2023 16:33:24 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
CC:     Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Jonathan Cameron <jic23@...nel.org>,
        <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Andi Shyti <andi.shyti@...nel.org>
Subject: Re: [PATCH 1/2] iio: dac: ad5755: mark OF related data as maybe
 unused

On Thu, 10 Aug 2023 13:19:32 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> 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@...aro.org>

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()

Jonathan


> ---
>  drivers/iio/dac/ad5755.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
> index 404865e35460..823049ce2686 100644
> --- a/drivers/iio/dac/ad5755.c
> +++ b/drivers/iio/dac/ad5755.c
> @@ -863,7 +863,7 @@ static const struct spi_device_id ad5755_id[] = {
>  };
>  MODULE_DEVICE_TABLE(spi, ad5755_id);
>  
> -static const struct of_device_id ad5755_of_match[] = {
> +static const struct of_device_id ad5755_of_match[] __maybe_unused = {
>  	{ .compatible = "adi,ad5755" },
>  	{ .compatible = "adi,ad5755-1" },
>  	{ .compatible = "adi,ad5757" },

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ