Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "John Madieu" <john.madieu.xa@bp.renesas.com>
Cc: devicetree@vger.kernel.org, wsa+renesas@sang-engineering.com,
	conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema
Date: Wed, 03 Jun 2026 20:39:49 +0000	[thread overview]
Message-ID: <20260603203950.131831F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260603202805.3530046-1-john.madieu.xa@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `dma-names` schema modification unintentionally converts variable-length arrays into strictly fixed-length tuples, enforcing exactly 5 or 10 items instead of allowing 1-5 or 1-10.
--

commit a5213139a119a047832e83895a5e3d493f04d666
Author: John Madieu <john.madieu.xa@bp.renesas.com>

ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

Express the dvc/src/ssiu dma-names as an items list rather than an
allOf-wrapped single schema, and drop the now-redundant maxItems. Fix
the ports container to reference graph.yaml's ports definition instead
of port-base (a ports container is not itself a port), keeping
port-base on the port@N children, and constrain each playback/capture
phandle-array entry to a single phandle.

> diff --git a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
> index d7fa165546985..80670019d2f45 100644
> --- a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
> +++ b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml

[ ... ]

> @@ -143,11 +139,12 @@ properties:
>                through the list to find a free channel.
>  
>            dma-names:
> -            maxItems: 5
> -            allOf:
> -              - items:
> -                  enum:
> -                    - tx
> +            items:
> +              - const: tx
> +              - const: tx
> +              - const: tx
> +              - const: tx
> +              - const: tx

[Severity: Medium]
Does this unintentionally enforce exactly 5 items?

In dt-schema, specifying an items list without an explicit minItems property
defaults minItems to the length of the list. Since the property description
mentions "As many as 5 can be provided", should we add minItems: 1 here so
it doesn't reject valid device trees specifying fewer fallback channels?

[ ... ]

> @@ -203,12 +200,22 @@ properties:
>                falls through the list to find a free channel.
>  
>            dma-names:
> -            maxItems: 10
> -            allOf:
> -              - items:
> -                  enum:
> -                    - tx
> -                    - rx
> +            items:
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]
> +              - enum: [ tx, rx ]

[Severity: Medium]
Similarly for the ssi and ssiu nodes, does defining an items list of 10
elements without an explicit minItems implicitly set minItems: 10?

Could this break dtbs_check for valid hardware configurations that provide
fewer than 10 channels?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260603202805.3530046-1-john.madieu.xa@bp.renesas.com?part=1

      reply	other threads:[~2026-06-03 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 20:28 [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema John Madieu
2026-06-03 20:39 ` sashiko-bot [this message]

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=20260603203950.131831F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=john.madieu.xa@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.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