All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michal Simek" <michal.simek@amd.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v5 2/5] dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern
Date: Wed, 08 Jul 2026 13:23:50 +0000	[thread overview]
Message-ID: <20260708132350.9AB441F000E9@smtp.kernel.org> (raw)
In-Reply-To: <e742b7da70c2bf10650a81e537f1b90d76799416.1783516336.git.michal.simek@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The revised regex pattern for `mio_clk` retains the `+` multiplier on the new numeric group, allowing unintended repeating 2-digit patterns, and still lacks the underscore required to match valid clock names.
--

--- Patch [2]: [PATCH v5 2/5] dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern ---
commit c70f74e0485f673c66443cff9bcebc2799e80656
Author: Michal Simek <michal.simek@amd.com>
dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern

This commit updates the clock-names regex pattern for mio_clk to restrict
the MIO index to the valid 00-77 range. It replaces the invalid character
class with an explicit alternation of two-digit values.

> diff --git a/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml b/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
> --- 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])+.*$"

[Severity: Medium]
Does this revised regex correctly enforce the intended clock names?

By keeping the + multiplier after the new capturing group, this pattern
appears to allow unintended repeating two-digit blocks, such as mio_clk0011,
to pass validation.

Additionally, if the hardware clock names require an underscore before the
digits (e.g., mio_clk_50), omitting the underscore means the regex expects
the digits immediately after the k. Device trees using a valid clock name
with an underscore might fail schema validation as a result.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1783516336.git.michal.simek@amd.com?part=2

  reply	other threads:[~2026-07-08 13:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 13:12 [PATCH v5 0/5] clock: versal-clk: Fix Versal NET clock binding and switch to CCF Michal Simek
2026-07-08 13:12 ` [PATCH v5 1/5] dt-bindings: firmware: xilinx: Add missing example for ZynqMP Michal Simek
2026-07-08 13:12 ` [PATCH v5 2/5] dt-bindings: clock: versal-clk: Fix mio_clk index range in clock-names pattern Michal Simek
2026-07-08 13:23   ` sashiko-bot [this message]
2026-07-08 13:12 ` [PATCH v5 3/5] dt-bindings: clock: Move xlnx,zynqmp-clk to its own schema Michal Simek
2026-07-08 13:12 ` [PATCH v5 4/5] dt-bindings: clock: versal-clk: Fix Versal NET clock validation Michal Simek
2026-07-08 13:12 ` [PATCH v5 5/5] arm64: versal-net: Switch Versal NET to firmware clock interface Michal Simek
2026-07-08 13:30   ` 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=20260708132350.9AB441F000E9@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 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.