Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Harendra Gautam" <harendra.gautam@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 08/10] ASoC: qcom: Add QAIF IRQ handling, suspend/resume and platform register
Date: Mon, 07 Sep 2026 12:36:45 +0000	[thread overview]
Message-ID: <20260907123645.D63641F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260907-b4-qaif-shikra-audio-v5-8-6d8ad9ba5c9f@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Hardcoded 2 cells for 'iommus' property parsing ignores '#iommu-cells' specification.
--

commit c9879e803b7f932397e4e9a7c40595da90b01510
Author: Harendra Gautam <harendra.gautam@oss.qualcomm.com>

ASoC: qcom: Add QAIF IRQ handling, suspend/resume and platform register

This commit completes the QAIF PCM platform support by adding component
registration and trigger handling for DMA interrupts. It sets up IRQ
dispatching for AIF and CIF DMA handlers, manages stream starting/stopping,
and retrieves the IOMMU stream ID during probe.

> diff --git a/sound/soc/qcom/qaif-platform.c b/sound/soc/qcom/qaif-platform.c
> index a64bbd7f6fe56..1da50a834b786 100644
> --- a/sound/soc/qcom/qaif-platform.c
> +++ b/sound/soc/qcom/qaif-platform.c

[ ... ]

> +int asoc_qcom_qaif_platform_register(struct platform_device *pdev)
> +{
> +	struct qaif_drv_data *drvdata = platform_get_drvdata(pdev);
> +	struct of_phandle_args iommu_spec;
> +	u32 sid;
> +	int ret;
> +
> +	if (!drvdata->variant->alloc_stream_dma_idx ||
> +	    !drvdata->variant->free_stream_dma_idx)
> +		return dev_err_probe(&pdev->dev, -EINVAL,
> +				     "Variant missing mandatory callbacks\n");
> +
> +	ret = of_parse_phandle_with_fixed_args(pdev->dev.of_node,
> +					       "iommus", 2, 0,
> +					       &iommu_spec);

[Severity: High]
Is it safe to hardcode 2 cells for the "iommus" property here?

This will deterministically fail to probe on platforms where the target
IOMMU uses #iommu-cells = <1>, which is very common for ARM SMMUs passing
a single Stream ID.

Should this use of_parse_phandle_with_args(pdev->dev.of_node, "iommus",
"#iommu-cells", 0, &iommu_spec) instead to correctly determine the cell
count from the target IOMMU node?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260907-b4-qaif-shikra-audio-v5-0-6d8ad9ba5c9f@oss.qualcomm.com?part=8

  reply	other threads:[~2026-09-07 12:36 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 [this message]
2026-09-07 12:09 ` [PATCH v5 09/10] ASoC: qcom: Add Shikra QAIF support Harendra Gautam
2026-09-07 12:42   ` sashiko-bot
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=20260907123645.D63641F00A3D@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