From: sashiko-bot@kernel.org
To: "Herve Codina" <herve.codina@bootlin.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, devicetree@vger.kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH v3 08/17] ASoC: simple-amplifier: Remove DAPM widgets and routes from the ASoC component driver
Date: Thu, 14 May 2026 03:32:49 +0000 [thread overview]
Message-ID: <20260514033249.8BC3EC19425@smtp.kernel.org> (raw)
In-Reply-To: <20260513081702.317117-9-herve.codina@bootlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Probe fails unconditionally for non-Device Tree instantiations (platform board files, ACPI PRP0001, or CONFIG_OF disabled).
--
commit a564ff83aa42e00d34fe9812df9996695059dbc5
Author: Herve Codina <herve.codina@bootlin.com>
ASoC: simple-amplifier: Remove DAPM widgets and routes from the ASoC component driver
This patch moves DAPM tables from the ASoC component driver to the device
compatible string matching data. This allows the simple-amplifier driver to
configure different DAPM widgets and routes dynamically during probe based
on the compatible string.
> diff --git a/sound/soc/codecs/simple-amplifier.c b/sound/soc/codecs/simple-amplifier.c
> index 231e84ab4c0e3..3e644c1c26960 100644
> --- a/sound/soc/codecs/simple-amplifier.c
> +++ b/sound/soc/codecs/simple-amplifier.c
[ ... ]
> @@ -75,6 +111,10 @@ static int simple_amp_probe(struct platform_device *pdev)
> return -ENOMEM;
> platform_set_drvdata(pdev, simple_amp);
>
> + simple_amp->data = of_device_get_match_data(dev);
> + if (!simple_amp->data)
> + return -EINVAL;
> +
Will this cause the probe function to fail unconditionally on non-Device
Tree platforms?
Since the driver does not depend on CONFIG_OF, it can be built and used on
systems without Device Tree. If CONFIG_OF is disabled, or if the device is
instantiated via ACPI PRP0001 where dev->of_node is NULL, the call to
of_device_get_match_data() will evaluate to NULL.
Because probe now returns -EINVAL when the match data is NULL, this looks
like it will prevent the driver from probing entirely on those platforms.
Could this use device_get_match_data() instead to safely support non-DT
systems?
> simple_amp->gpiod_enable = devm_gpiod_get_optional(dev, "enable",
> GPIOD_OUT_LOW);
> if (IS_ERR(simple_amp->gpiod_enable))
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260513081702.317117-1-herve.codina@bootlin.com?part=8
next prev parent reply other threads:[~2026-05-14 3:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 8:16 [PATCH v3 00/17] ASoC: Add support for GPIOs driven amplifiers Herve Codina
2026-05-13 8:16 ` [PATCH v3 01/17] of: Introduce of_property_read_s32_index() Herve Codina
2026-05-13 8:16 ` [PATCH v3 02/17] ASoC: dt-bindings: Add support for the GPIOs driven amplifier Herve Codina
2026-05-13 8:16 ` [PATCH v3 03/17] ASoC: simple-amplifier: Remove DRV_NAME defined value Herve Codina
2026-05-13 8:16 ` [PATCH v3 04/17] ASoC: simple-amplifier: Add missing headers Herve Codina
2026-05-13 8:16 ` [PATCH v3 05/17] ASoC: simple-amplifier: Remove CONFIG_OF flag and of_match_ptr() Herve Codina
2026-05-13 8:16 ` [PATCH v3 06/17] ASoC: simple-amplifier: Rename drv_event() function Herve Codina
2026-05-13 8:16 ` [PATCH v3 07/17] ASoC: simple-amplifier: Use 'simple_amp' variable name instead of 'priv' Herve Codina
2026-05-13 8:16 ` [PATCH v3 08/17] ASoC: simple-amplifier: Remove DAPM widgets and routes from the ASoC component driver Herve Codina
2026-05-14 3:32 ` sashiko-bot [this message]
2026-05-13 8:16 ` [PATCH v3 09/17] ASoC: simple-amplifier: Introduce support for gpio-audio-amp Herve Codina
2026-05-14 3:51 ` sashiko-bot
2026-05-13 8:16 ` [PATCH v3 10/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for extra power supplies Herve Codina
2026-05-13 8:16 ` [PATCH v3 11/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for mute gpio Herve Codina
2026-05-13 8:16 ` [PATCH v3 12/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for bypass gpio Herve Codina
2026-05-14 4:54 ` sashiko-bot
2026-05-13 8:16 ` [PATCH v3 13/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for basic gain Herve Codina
2026-05-13 8:16 ` [PATCH v3 14/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-ranges Herve Codina
2026-05-14 6:10 ` sashiko-bot
2026-05-13 8:16 ` [PATCH v3 15/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-labels Herve Codina
2026-05-13 8:17 ` [PATCH v3 16/17] ASoC: simple-amplifier: Update author and copyright Herve Codina
2026-05-14 6:49 ` sashiko-bot
2026-05-13 8:17 ` [PATCH v3 17/17] MAINTAINERS: Add the ASoC gpio audio amplifier entry Herve Codina
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=20260514033249.8BC3EC19425@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=herve.codina@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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