From: "Nuno Sá" <nuno.sa@analog.com>
To: "Alvin Šipraga" <alvin.sipraga@analog.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr()
Date: Mon, 14 Sep 2026 13:19:02 +0100 [thread overview]
Message-ID: <aqflvL8a6mgEAUNS@nsa> (raw)
In-Reply-To: <20260914-asoc-adau1977-fixes-v1-2-aa2f0cabd728@analog.com>
On Mon, Sep 14, 2026 at 12:12:36PM +0200, Alvin Šipraga wrote:
> Since commit 5ab23c7923a1 ("modpost: Create modalias for builtin
> modules") MODULE_DEVICE_TABLE() is enough to reference a match table and
> the data isn't discarded by the linker even when the driver is built-in
> and CONFIG_OF is disabled. Drop the of_match_ptr() wrapping so that OF
> matching keeps working regardless of CONFIG_OF. This also means we can
> drop __maybe_unused since it's always used.
>
> The entries in adau1977_spi_of_match were also erroneously indented with
> spaces - replace the indentation with tabs to conform with coding style.
>
> Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
Small nit:
> sound/soc/codecs/adau1977-spi.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/codecs/adau1977-spi.c b/sound/soc/codecs/adau1977-spi.c
> index 878cde9d1014..c98da5ba9e9e 100644
> --- a/sound/soc/codecs/adau1977-spi.c
> +++ b/sound/soc/codecs/adau1977-spi.c
> @@ -53,18 +53,18 @@ static const struct spi_device_id adau1977_spi_ids[] = {
> };
> MODULE_DEVICE_TABLE(spi, adau1977_spi_ids);
>
> -static const struct of_device_id adau1977_spi_of_match[] __maybe_unused = {
> - { .compatible = "adi,adau1977" },
> - { .compatible = "adi,adau1978" },
> - { .compatible = "adi,adau1979" },
> - { },
> +static const struct of_device_id adau1977_spi_of_match[] = {
> + { .compatible = "adi,adau1977" },
> + { .compatible = "adi,adau1978" },
> + { .compatible = "adi,adau1979" },
> + { },
While at it, you cloud drop the comma. We have the null terminator after
all. Also applies on patch 3
- Nuno Sá
> };
> MODULE_DEVICE_TABLE(of, adau1977_spi_of_match);
>
> static struct spi_driver adau1977_spi_driver = {
> .driver = {
> .name = "adau1977",
> - .of_match_table = of_match_ptr(adau1977_spi_of_match),
> + .of_match_table = adau1977_spi_of_match,
> },
> .probe = adau1977_spi_probe,
> .id_table = adau1977_spi_ids,
>
> --
> 2.54.0
>
next prev parent reply other threads:[~2026-09-14 12:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 10:12 [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Alvin Šipraga
2026-09-14 10:12 ` [PATCH 1/3] ASoC: adau1977: make the Kconfig symbols user selectable Alvin Šipraga
2026-09-14 10:12 ` [PATCH 2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr() Alvin Šipraga
2026-09-14 12:19 ` Nuno Sá [this message]
2026-09-14 10:12 ` [PATCH 3/3] ASoC: adau1977-i2c: add OF match table for I2C Alvin Šipraga
2026-09-14 12:20 ` [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Nuno Sá
2026-09-14 14:20 ` Mark Brown
2026-09-16 19:10 ` Mark Brown
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=aqflvL8a6mgEAUNS@nsa \
--to=nuno.sa@analog.com \
--cc=alvin.sipraga@analog.com \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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
all inboxes | Powered by JetHome®