Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH] dt-bindings: arm: keystone: ti,sci: Correct reg and mboxes constraints
Date: Fri, 02 Oct 2026 09:14:32 +0000	[thread overview]
Message-ID: <20261002091432.8FF8C1F00899@smtp.kernel.org> (raw)
In-Reply-To: <20261002063011.38972-2-krzysztof.kozlowski@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: missing minItems allows incomplete mboxes array
--

commit 344119f20b7b40eacf80223cff1d1579d7303039
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

dt-bindings: arm: keystone: ti,sci: Correct reg and mboxes constraints

This commit replaces minItems constraints with maxItems constraints for the
reg and mboxes properties. It intends to enforce an upper bound on these
lists while assuming the lower bound remains intact.

>     minItems does not impose any limit on actual maximum number of items in
>     a list, thus it needs maxItems.  maxItems on the other hand does imply
>     minItems.  Add missing upper bound on 'reg' and 'mboxes'.

[Severity: Medium]
Is the statement that maxItems implies minItems accurate for values greater
than 1?

In JSON Schema and dt-schema, omitting minItems on an array defaults to
minItems: 1, regardless of the maxItems value.

> diff --git a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml b/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml
> index 25a2b42105e54..052e23966a8f1 100644
> --- a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml
> +++ b/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml
[ ... ]
> @@ -59,7 +59,7 @@ properties:
>        - const: tx
>  
>    mboxes:
> -    minItems: 2
> +    maxItems: 2

[Severity: Medium]
Does removing minItems: 2 here incorrectly allow partial configurations?

A device tree providing only a single mailbox will pass schema validation
since the default minItems is 1, even though exactly two mailboxes (rx and
tx) are required by the hardware and the mbox-names constraint.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261002063011.38972-2-krzysztof.kozlowski@oss.qualcomm.com?part=1

  reply	other threads:[~2026-10-02  9:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  6:30 [PATCH] dt-bindings: arm: keystone: ti,sci: Correct reg and mboxes constraints Krzysztof Kozlowski
2026-10-02  9:14 ` sashiko-bot [this message]
2026-10-02  9:46   ` Krzysztof Kozlowski
2026-10-02 16:49 ` Conor Dooley
2026-10-08 20:11 ` Rob Herring (Arm)

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=20261002091432.8FF8C1F00899@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski@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