public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Jonathan Cameron <jic23@kernel.org>, <linux-iio@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Andi Shyti <andi.shyti@kernel.org>
Subject: Re: [PATCH 2/2] iio: proximity: isl29501: mark OF related data as maybe unused
Date: Fri, 11 Aug 2023 16:34:04 +0100	[thread overview]
Message-ID: <20230811163404.00003ba3@Huawei.com> (raw)
In-Reply-To: <20230810111933.205619-2-krzysztof.kozlowski@linaro.org>

On Thu, 10 Aug 2023 13:19:33 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.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@linaro.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 = {


  reply	other threads:[~2023-08-11 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 11:19 [PATCH 1/2] iio: dac: ad5755: mark OF related data as maybe unused Krzysztof Kozlowski
2023-08-10 11:19 ` [PATCH 2/2] iio: proximity: isl29501: " Krzysztof Kozlowski
2023-08-11 15:34   ` Jonathan Cameron [this message]
2023-08-11 15:33 ` [PATCH 1/2] iio: dac: ad5755: " Jonathan Cameron
2023-08-15 14:04   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230811163404.00003ba3@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andi.shyti@kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox