Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 1/3] ASoC: dt-bindings: qcom,q6apm-lpass-dais: Document DAI subnode
Date: Tue, 14 Jul 2026 14:58:53 +0000	[thread overview]
Message-ID: <20260714145854.450031F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260714145250.2473461-2-mohammad.rafi.shaik@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The node-level `oneOf` block defining `clock-names` combinations incorrectly uses `additionalProperties: false` and `oneOf`, which will reject valid device tree nodes.
--

--- Patch [1]: [PATCH v5 1/3] ASoC: dt-bindings: qcom,q6apm-lpass-dais: Document DAI subnode ---
commit b46d22527ffbe28aec4e679dc5521422e9052491
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>

ASoC: dt-bindings: qcom,q6apm-lpass-dais: Document DAI subnode

Extend the qcom,q6apm-lpass-dais device tree binding to explicitly describe
Digital Audio Interface (DAI) child nodes. Add address and size cells to
allow representation of multiple DAI instances as child nodes, and define a
dai@<id> pattern to document per-DAI properties.

> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml
> --- a/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml
[ ... ]
> +patternProperties:
> +  '^dai@[0-9a-f]+$':
> +    type: object
> +    description:
> +      Q6DSP Digital Audio Interfaces.
[ ... ]
> +    allOf:
> +      - oneOf:
> +          - properties:
> +              reg: true
> +              clocks: true
> +              clock-names:
> +                items:
> +                  - const: mclk
> +            additionalProperties: false
> +          - properties:
> +              reg: true
> +              clocks: true
> +              clock-names:
> +                items:
> +                  - const: bclk
> +            additionalProperties: false
> +          - properties:
> +              reg: true
> +              clocks: true
> +              clock-names:
> +                items:
> +                  - const: eclk
> +            additionalProperties: false
> +          - properties:
> +              reg: true
> +              clocks: true
> +              clock-names:
> +                items:
> +                  - const: mclk
> +                  - const: bclk
> +            additionalProperties: false
> +          - properties:
> +              reg: true
> +              clocks: true
> +              clock-names:
> +                items:
> +                  - const: mclk
> +                  - const: eclk
> +            additionalProperties: false

[Severity: Medium]
Will this additionalProperties: false restriction inside the patternProperties:
'^dai@[0-9a-f]+$' block reject valid device tree nodes?

When additionalProperties: false is used inside these oneOf branches, it
restricts the node exclusively to reg, clocks, and clock-names. This means
standard meta-properties like status or $nodename will be rejected during
dtbs_check.

Also, if a device tree node omits the optional clock-names property (for
example: dai@0 { reg = <0>; };), won't it match multiple branches of the oneOf
block since the missing property vacuously satisfies the sub-schema properties
constraint in all branches? Because oneOf requires exactly one match, this
causes validation to fail and throws an error for multiple matches.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260714145250.2473461-1-mohammad.rafi.shaik@oss.qualcomm.com?part=1

  reply	other threads:[~2026-07-14 14:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 14:52 [PATCH v5 0/3] ASoC: qcom: qdsp6: Add MI2S clock control Mohammad Rafi Shaik
2026-07-14 14:52 ` [PATCH v5 1/3] ASoC: dt-bindings: qcom,q6apm-lpass-dais: Document DAI subnode Mohammad Rafi Shaik
2026-07-14 14:58   ` sashiko-bot [this message]
2026-07-14 14:52 ` [PATCH v5 2/3] ASoC: qcom: q6apm-lpass-dais: Add MI2S clock control Mohammad Rafi Shaik
2026-07-14 14:52 ` [PATCH v5 3/3] ASoC: qcom: sc8280xp: enhance machine driver for board-specific config Mohammad Rafi Shaik
2026-07-14 15:06   ` sashiko-bot

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=20260714145854.450031F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mohammad.rafi.shaik@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