From: sashiko-bot@kernel.org
To: "Chen-Yu Tsai" <wenst@chromium.org>
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-amlogic@lists.infradead.org, imx@lists.linux.dev,
robh@kernel.org, conor+dt@kernel.org, Frank.Li@kernel.org,
neil.armstrong@linaro.org
Subject: Re: [PATCH 1/2] dt-bindings: usb: hcd: Add downstream USB ports
Date: Wed, 14 Oct 2026 08:31:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-171010@kernel.org> (raw)
In-Reply-To: <20261014082037.1774672-2-wenst@chromium.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: usb: port@0 schema constraint bypassed
--
commit aaa6107663f4d524c266c3a18264c416a86a4bb4
Author: Chen-Yu Tsai <wenst@chromium.org>
dt-bindings: usb: hcd: Add downstream USB ports
This commit adds a "ports" child node to the USB HCD binding to support
connecting downstream USB connector nodes via OF graph. It attempts to enforce
that USB downstream port numbers start at 1, and updates the address matching
for hard-wired downstream devices.
> diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> index 45a19d4928afa..24df99dfb243c 100644
> --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> @@ -29,8 +29,16 @@ properties:
> "#size-cells":
> const: 0
>
> + ports:
> + $ref: /schemas/graph.yaml#/properties/ports
> + description: The downstream facing USB ports
> +
> + patternProperties:
> + "^port@[1-9a-f][0-9a-f]?$":
> + $ref: /schemas/graph.yaml#/properties/port
[Severity: Medium]
Does this local constraint actually prevent port@0 from passing validation?
Since JSON schema patternProperties only restrict matching nodes, a
non-matching node like port@0 will fall back to the generic graph.yaml
reference.
Because graph.yaml evaluates anything matching ^port(@.*)?$, wouldn't
port@0 be evaluated as valid and silently pass, completely bypassing the
intent that downstream port numbers start at 1?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014082037.1774672-1-wenst@chromium.org?part=1
WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Chen-Yu Tsai" <wenst@chromium.org>
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-amlogic@lists.infradead.org, imx@lists.linux.dev,
robh@kernel.org, conor+dt@kernel.org, Frank.Li@kernel.org,
neil.armstrong@linaro.org
Subject: Re: [PATCH 1/2] dt-bindings: usb: hcd: Add downstream USB ports
Date: Wed, 14 Oct 2026 08:31:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-171010@kernel.org> (raw)
In-Reply-To: <20261014082037.1774672-2-wenst@chromium.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: usb: port@0 schema constraint bypassed
--
commit aaa6107663f4d524c266c3a18264c416a86a4bb4
Author: Chen-Yu Tsai <wenst@chromium.org>
dt-bindings: usb: hcd: Add downstream USB ports
This commit adds a "ports" child node to the USB HCD binding to support
connecting downstream USB connector nodes via OF graph. It attempts to enforce
that USB downstream port numbers start at 1, and updates the address matching
for hard-wired downstream devices.
> diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> index 45a19d4928afa..24df99dfb243c 100644
> --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> @@ -29,8 +29,16 @@ properties:
> "#size-cells":
> const: 0
>
> + ports:
> + $ref: /schemas/graph.yaml#/properties/ports
> + description: The downstream facing USB ports
> +
> + patternProperties:
> + "^port@[1-9a-f][0-9a-f]?$":
> + $ref: /schemas/graph.yaml#/properties/port
[Severity: Medium]
Does this local constraint actually prevent port@0 from passing validation?
Since JSON schema patternProperties only restrict matching nodes, a
non-matching node like port@0 will fall back to the generic graph.yaml
reference.
Because graph.yaml evaluates anything matching ^port(@.*)?$, wouldn't
port@0 be evaluated as valid and silently pass, completely bypassing the
intent that downstream port numbers start at 1?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014082037.1774672-1-wenst@chromium.org?part=1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-10-14 8:31 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 8:20 [PATCH 0/2] dt-bindings: usb: downstream host ports for hcd and dwc3 Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:20 ` [PATCH 1/2] dt-bindings: usb: hcd: Add downstream USB ports Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:31 ` sashiko-bot [this message]
2026-10-14 8:31 ` sashiko-bot
2026-10-14 10:16 ` Chen-Yu Tsai
2026-10-14 10:16 ` Chen-Yu Tsai
2026-10-14 8:20 ` [PATCH 2/2] dt-bindings: usb: snps,dwc3: Fix downstream port numbering Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:20 ` Chen-Yu Tsai
2026-10-14 8:28 ` Neil Armstrong
2026-10-14 8:28 ` Neil Armstrong
2026-10-14 8:28 ` Neil Armstrong
2026-10-14 8:28 ` Neil Armstrong
2026-10-14 9:29 ` Chen-Yu Tsai
2026-10-14 9:29 ` Chen-Yu Tsai
2026-10-14 9:29 ` Chen-Yu Tsai
2026-10-14 9:29 ` Chen-Yu Tsai
2026-10-14 9:44 ` Neil Armstrong
2026-10-14 9:44 ` Neil Armstrong
2026-10-14 9:44 ` Neil Armstrong
2026-10-14 9:44 ` Neil Armstrong
2026-10-14 10:14 ` Chen-Yu Tsai
2026-10-14 10:14 ` Chen-Yu Tsai
2026-10-14 10:14 ` Chen-Yu Tsai
2026-10-14 10:14 ` Chen-Yu Tsai
2026-10-14 12:15 ` Neil Armstrong
2026-10-14 12:15 ` Neil Armstrong
2026-10-14 12:15 ` Neil Armstrong
2026-10-14 12:15 ` Neil Armstrong
2026-10-14 8:31 ` sashiko-bot
2026-10-14 8:31 ` 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=sashiko-outbox-171010@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wenst@chromium.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.