From: sashiko-bot@kernel.org
To: "Michal Simek" <michal.simek@amd.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 2/5] dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern
Date: Wed, 08 Jul 2026 07:32:05 +0000 [thread overview]
Message-ID: <20260708073206.5B8151F000E9@smtp.kernel.org> (raw)
In-Reply-To: <f0ef921cf0a5762c0530d0f5c4fe252ab35854f4.1783495122.git.michal.simek@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The `xlnx,versal-net-clk` compatible string matches multiple contradictory `if` blocks, making valid device tree nodes mathematically impossible to validate.
--
--- Patch [2]: [PATCH v4 2/5] dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern ---
commit bbeb0fbfb689e023d79c16fd79850f4f854a36ee
Author: Michal Simek <michal.simek@amd.com>
dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern
The clock-names pattern "^mio_clk[00-77]+.*$" was intended to constrain
the MIO index to the valid range 00..77 (ZynqMP has 78 MIO pins),
but a regex character class cannot express a multi-digit decimal range.
Replace the bogus character class with an explicit alternation that
enumerates the two-digit decimal values 00..77.
Fixes: 03d4a1004053 ("dt-bindings: clock: versal: Convert the xlnx,zynqmp-clk.txt to yaml")
Signed-off-by: Michal Simek <michal.simek@amd.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
> diff --git a/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml b/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
> index bef109d163a82..b1623c2ab0f69 100644
> --- a/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
> +++ b/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
> @@ -116,7 +116,7 @@ allOf:
> - const: pss_alt_ref_clk
> - const: aux_ref_clk
> - const: gt_crx_ref_clk
> - - pattern: "^mio_clk[00-77]+.*$"
> + - pattern: "^mio_clk([0-6][0-9]|7[0-7])+.*$"
> - pattern: "gem[0-3]+_emio_clk.*$"
> - pattern: "swdt[0-1]+_ext_clk.*$"
[Severity: High]
This is a pre-existing issue and was not introduced by the patch under review,
but does the current allOf schema make it impossible to validate
xlnx,versal-net-clk nodes?
Since xlnx,versal-net-clk uses xlnx,versal-clk as a fallback string, this
first conditional in Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
will match:
allOf:
- if:
properties:
compatible:
contains:
enum:
- xlnx,versal-clk
then:
properties:
clocks:
items:
- description: reference clock
- description: alternate reference clock for programmable logic
This restricts the node to exactly 2 clocks. However, because both conditions
are processed, the following conditional for xlnx,versal-net-clk also matches:
- if:
properties:
compatible:
contains:
enum:
- xlnx,versal-net-clk
then:
properties:
clocks:
items:
- description: reference clock
- description: alternate reference clock for programmable logic
- description: alternate reference clock
This applies a 3-item length constraint. Could this cause the schema to
unconditionally reject valid xlnx,versal-net-clk nodes since it forces the
node to have exactly 2 and exactly 3 clocks simultaneously?
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1783495122.git.michal.simek@amd.com?part=2
next prev parent reply other threads:[~2026-07-08 7:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 7:18 [PATCH v4 0/5] clock: versal-clk: Fix Versal NET clock binding and switch to CCF Michal Simek
2026-07-08 7:18 ` [PATCH v4 1/5] dt-bindings: firmware: xilinx: Add missing example for ZynqMP Michal Simek
2026-07-08 7:27 ` sashiko-bot
2026-07-08 7:18 ` [PATCH v4 2/5] dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern Michal Simek
2026-07-08 7:32 ` sashiko-bot [this message]
2026-07-08 10:59 ` Michal Simek
2026-07-08 7:18 ` [PATCH v4 3/5] dt-bindings: clock: Move xlnx,zynqmp-clk to its own schema Michal Simek
2026-07-08 7:37 ` sashiko-bot
2026-07-08 11:49 ` Michal Simek
2026-07-08 9:06 ` Rob Herring (Arm)
2026-07-08 7:18 ` [PATCH v4 4/5] dt-bindings: clock: versal-clk: Fix Versal NET clock validation Michal Simek
2026-07-08 7:18 ` [PATCH v4 5/5] arm64: versal-net: Switch Versal NET to firmware clock interface Michal Simek
2026-07-08 7:42 ` sashiko-bot
2026-07-08 11:51 ` Michal Simek
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=20260708073206.5B8151F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=michal.simek@amd.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