From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Arnd Bergmann <arnd@kernel.org>,
linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 16/34] iio: ad5755: hook up of_device_id lookup to platform driver
Date: Wed, 3 Apr 2024 11:55:06 +0200 [thread overview]
Message-ID: <e9aefdcd-5ee7-4b19-847e-5fb3d95cf46c@linaro.org> (raw)
In-Reply-To: <20240403080702.3509288-17-arnd@kernel.org>
On 03/04/2024 10:06, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When the driver is built-in, 'make W=1' warns about an unused
> ID table:
>
> drivers/iio/dac/ad5755.c:866:34: error: 'ad5755_of_match' defined but not used [-Werror=unused-const-variable=]
> 866 | static const struct of_device_id ad5755_of_match[] = {
>
> While the data is duplicated in the spi_device_id, it's common
> to use the actual OF compatible strings in the driver.
>
> Since there are no in-tree users of plain platform devices, the
> spi_device_id table could actually be dropped entirely with this.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/iio/dac/ad5755.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
> index 404865e35460..5c1e7f428c25 100644
> --- a/drivers/iio/dac/ad5755.c
> +++ b/drivers/iio/dac/ad5755.c
> @@ -876,6 +876,7 @@ MODULE_DEVICE_TABLE(of, ad5755_of_match);
> static struct spi_driver ad5755_driver = {
> .driver = {
> .name = "ad5755",
> + .of_match_table = ad5755_of_match,
I was working on this as well and have a bit bigger solution, following
Jonathan's preference (I think):
https://lore.kernel.org/all/20240226192555.14aa178e@jic23-huawei/
I need to send v3, somehow I missed his comments.
Jonathan,
Do you want me to still work on this according to your comments (which I
missed, I am sorry).
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-04-03 9:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann
2024-04-03 8:06 ` [PATCH 16/34] iio: ad5755: hook up of_device_id lookup to platform driver Arnd Bergmann
2024-04-03 9:36 ` Andy Shevchenko
2024-04-03 9:55 ` Krzysztof Kozlowski [this message]
2024-04-03 10:01 ` Arnd Bergmann
2024-04-06 15:30 ` Jonathan Cameron
2024-04-06 15:31 ` Jonathan Cameron
2024-04-06 5:20 ` [PATCH 00/34] address all -Wunused-const warnings patchwork-bot+netdevbpf
2024-04-10 8:02 ` (subset) " Sebastian Reichel
2024-04-22 8:16 ` Michael Ellerman
2025-01-27 13:24 ` Andy Shevchenko
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=e9aefdcd-5ee7-4b19-847e-5fb3d95cf46c@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Michael.Hennerich@analog.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=jic23@kernel.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