[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230811163404.00003ba3@Huawei.com>
Date: Fri, 11 Aug 2023 16:34:04 +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 2/2] iio: proximity: isl29501: mark OF related data as
maybe unused
On Thu, 10 Aug 2023 13:19:33 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:
> When compile tested with W=1 on x86_64 with driver as built-in:
>
> isl29501.c:999:34: error: unused variable 'isl29501_i2c_matches' [-Werror,-Wunused-const-variable]
>
> The if defined(CONFIG_OF) is also not needed in such case.
As in patch 1 I'd rather see it used. Not even an match data to make that more complex
here.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
> drivers/iio/proximity/isl29501.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/proximity/isl29501.c b/drivers/iio/proximity/isl29501.c
> index bcebacaf3dab..9e34224b5775 100644
> --- a/drivers/iio/proximity/isl29501.c
> +++ b/drivers/iio/proximity/isl29501.c
> @@ -995,13 +995,11 @@ static const struct i2c_device_id isl29501_id[] = {
>
> MODULE_DEVICE_TABLE(i2c, isl29501_id);
>
> -#if defined(CONFIG_OF)
> -static const struct of_device_id isl29501_i2c_matches[] = {
> +static const struct of_device_id isl29501_i2c_matches[] __maybe_unused = {
> { .compatible = "renesas,isl29501" },
> { }
> };
> MODULE_DEVICE_TABLE(of, isl29501_i2c_matches);
> -#endif
>
> static struct i2c_driver isl29501_driver = {
> .driver = {
Powered by blists - more mailing lists