From: sashiko-bot@kernel.org
To: "Harendra Gautam" <harendra.gautam@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 09/10] ASoC: qcom: Add Shikra QAIF support
Date: Mon, 07 Sep 2026 12:42:39 +0000 [thread overview]
Message-ID: <20260907124239.C04E11F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907-b4-qaif-shikra-audio-v5-9-6d8ad9ba5c9f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Redundant devm_clk_get() calls for the same clock index leak devres memory and keep unnecessary clock references.
--
commit 63cae5b8a9cf9b494a9486e0a0b07d1b244a6f6c
Author: Harendra Gautam <harendra.gautam@oss.qualcomm.com>
ASoC: qcom: Add Shikra QAIF support
This commit adds the Shikra variant data for the Qualcomm Audio Interface
(QAIF) driver. It provides DMA-to-DAI mappings, clock names, DAI driver
data, and other parameters needed by the QAIF driver.
> diff --git a/sound/soc/qcom/qaif-shikra.c b/sound/soc/qcom/qaif-shikra.c
> new file mode 100644
> index 0000000000000..0d5c2baade28f
> --- /dev/null
> +++ b/sound/soc/qcom/qaif-shikra.c
[ ... ]
> +static const struct qaif_variant shikra_qaif_data = {
[ ... ]
> + .num_clks = 3,
> +
> + .dai_driver = shikra_qaif_cpu_dai_driver,
> + .num_dai = ARRAY_SIZE(shikra_qaif_cpu_dai_driver),
> +
> + .dai_bit_clk_names = (const char * const []) {
> + "aif_if0_ibit",
> + "aif_if1_ibit",
> + "aif_if2_ibit",
> + "aif_if3_ibit",
> + },
[Severity: Medium]
Will this configuration cause redundant devm_clk_get() calls and leak devres
memory?
Looking at asoc_qcom_qaif_cpu_platform_probe() in sound/soc/qcom/qaif-cpu.c, it
iterates over variant->num_dai and fetches the clock for each DAI's index:
for (i = 0; i < variant->num_dai; i++) {
...
idx = variant->get_dma_idx(dai_id);
if (idx < 0)
continue;
drvdata->mi2s_bit_clk[idx] =
devm_clk_get(dev, variant->dai_bit_clk_names[idx]);
...
}
Since multiple DAIs in shikra_qaif_cpu_dai_driver (such as AIF_MI2S_RX_0 and
AIF_MI2S_TX_0) map to the same get_dma_idx() value, won't this overwrite the
same drvdata->mi2s_bit_clk[idx] pointer multiple times without checking if it
was already acquired?
Could this allocate redundant devres handles and keep unnecessary clock
references during probe?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907-b4-qaif-shikra-audio-v5-0-6d8ad9ba5c9f@oss.qualcomm.com?part=9
next prev parent reply other threads:[~2026-09-07 12:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 12:09 [PATCH v5 00/10] ASoC: qcom: Add QAIF driver for Shikra audio platform Harendra Gautam
2026-09-07 12:09 ` [PATCH v5 01/10] ASoC: dt-bindings: qcom,shikra-qaif-cpu: Add binding Harendra Gautam
2026-09-07 12:20 ` sashiko-bot
2026-09-08 19:49 ` Mark Brown
2026-09-09 6:26 ` Harendra Gautam
2026-09-07 12:09 ` [PATCH v5 02/10] ASoC: qcom: Add QAIF shared data structures and variant interface Harendra Gautam
2026-09-07 12:09 ` [PATCH v5 03/10] ASoC: qcom: Add QAIF hardware register map Harendra Gautam
2026-09-07 12:23 ` sashiko-bot
2026-09-07 12:09 ` [PATCH v5 04/10] ASoC: qcom: Add QAIF CPU DAI ops, regmap, DT parsing and platform init Harendra Gautam
2026-09-07 12:25 ` sashiko-bot
2026-09-07 12:09 ` [PATCH v5 05/10] ASoC: soc-core: Add snd_soc_of_xlate_dai_name() generic helper Harendra Gautam
2026-09-07 12:09 ` [PATCH v5 06/10] ASoC: qcom: Switch lpass-cpu and qaif-cpu to snd_soc_of_xlate_dai_name() Harendra Gautam
2026-09-07 12:09 ` [PATCH v5 07/10] ASoC: qcom: Add QAIF PCM operations Harendra Gautam
2026-09-07 12:38 ` sashiko-bot
2026-09-07 12:09 ` [PATCH v5 08/10] ASoC: qcom: Add QAIF IRQ handling, suspend/resume and platform register Harendra Gautam
2026-09-07 12:36 ` sashiko-bot
2026-09-07 12:09 ` [PATCH v5 09/10] ASoC: qcom: Add Shikra QAIF support Harendra Gautam
2026-09-07 12:42 ` sashiko-bot [this message]
2026-09-07 12:09 ` [PATCH v5 10/10] MAINTAINERS: Add Qualcomm QAIF driver entry Harendra Gautam
2026-09-08 19:54 ` [PATCH v5 00/10] ASoC: qcom: Add QAIF driver for Shikra audio platform Mark Brown
2026-09-09 6:33 ` Harendra Gautam
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=20260907124239.C04E11F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=harendra.gautam@oss.qualcomm.com \
--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