Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Stefan Dösinger" <stefandoesinger@gmail.com>
Cc: neil.armstrong@linaro.org, devicetree@vger.kernel.org,
	vkoul@kernel.org, mfd@lists.linux.dev, lee@kernel.org,
	linux-phy@lists.infradead.org, olteanv@gmail.com,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v9 02/12] dt-bindings: clk: zte: Add zx297520v3 matrix clock and reset controller
Date: Sun, 02 Aug 2026 20:42:37 +0000	[thread overview]
Message-ID: <20260802204238.1AEB51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260802-zx29clk-v9-2-d05530d85d28@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Overlapping macro definitions in shared dt-bindings headers create a naming collision risk.
--

--- Patch [2]: [PATCH v9 02/12] dt-bindings: clk: zte: Add zx297520v3 matrix clock and reset controller ---
commit 504f3c5393f4a8144508453d38c306eb0f25c3f4
Author: Stefan Dösinger <stefandoesinger@gmail.com>

dt-bindings: clk: zte: Add zx297520v3 matrix clock and reset controller

This commit adds device tree bindings for the zx297520v3 matrix clock and
reset controller. It introduces new macros for clocks and resets in the
existing zte,zx297520v3 headers to support the matrixcrm block.

> diff --git a/include/dt-bindings/clock/zte,zx297520v3-clk.h b/include/dt-bindings/clock/zte,zx297520v3-clk.h
> index 3aed94ccc26fe..a8477e9b2a149 100644
> --- a/include/dt-bindings/clock/zte,zx297520v3-clk.h
> +++ b/include/dt-bindings/clock/zte,zx297520v3-clk.h
> @@ -63,4 +63,45 @@
>  #define ZX297520V3_HSIC_WCLK			54
>  #define ZX297520V3_HSIC_PCLK			55
>  
> +#define ZX297520V3_SYS_TIMER_WCLK		0
> +#define ZX297520V3_CPU_WCLK			1

[Severity: Medium]
Could this naming convention lead to silent misconfigurations in device trees?

These new matrixcrm macros share the exact same ZX297520V3_ prefix as the
existing topcrm macros in this header, and their indices start over at 0.

Since both sets of macros resolve to valid integers within the same namespace,
accidentally referencing a topcrm macro instead of a matrixcrm macro in a
device tree will not trigger a compiler error, making hardware misconfigurations
difficult to debug.

[ ... ]

> diff --git a/include/dt-bindings/reset/zte,zx297520v3-reset.h b/include/dt-bindings/reset/zte,zx297520v3-reset.h
> index f60aaccf0f4d7..d79fa601afa68 100644
> --- a/include/dt-bindings/reset/zte,zx297520v3-reset.h
> +++ b/include/dt-bindings/reset/zte,zx297520v3-reset.h
> @@ -27,4 +27,16 @@
>  #define ZX297520V3_USB_RESET			18
>  #define ZX297520V3_HSIC_RESET			19
>  
> +#define ZX297520V3_CPU_RESET			0
> +#define ZX297520V3_DDR_CTRL_RESET		1

[Severity: Medium]
Does this carry the same namespace collision risk as the clock macros above?

Since the matrixcrm reset indices also start at 0 and use the identical
ZX297520V3_ prefix as the existing topcrm reset definitions, there is no built-in
protection against mixing them up when writing the device tree.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260802-zx29clk-v9-0-d05530d85d28@gmail.com?part=2

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-08-02 20:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-02 20:33 [PATCH v9 00/12] ZTE zx297520v3 clock bindings and driver Stefan Dösinger
2026-08-02 20:33 ` [PATCH v9 01/12] dt-bindings: clk: zte: Add zx297520v3 top clock and reset controller Stefan Dösinger
2026-08-02 20:42   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 02/12] dt-bindings: clk: zte: Add zx297520v3 matrix " Stefan Dösinger
2026-08-02 20:42   ` sashiko-bot [this message]
2026-08-02 20:33 ` [PATCH v9 03/12] dt-bindings: clk: zte: Add zx297520v3 LSP " Stefan Dösinger
2026-08-02 20:40   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 04/12] mfd: zx297520v3: Add a clock and reset MFD driver Stefan Dösinger
2026-08-02 20:45   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 05/12] clk: zte: Add Clock registration infrastructure Stefan Dösinger
2026-08-02 20:49   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 06/12] clk: zte: Add regmap-based clocks Stefan Dösinger
2026-08-02 20:55   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 07/12] clk: zte: Add zx PLL support infrastructure Stefan Dösinger
2026-08-02 20:52   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 08/12] clk: zte: Introduce a driver for zx297520v3 top clocks Stefan Dösinger
2026-08-02 20:59   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks Stefan Dösinger
2026-08-02 21:26   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 10/12] clk: zte: Introduce a driver for zx297520v3 LSP clocks Stefan Dösinger
2026-08-02 20:59   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 11/12] reset: zte: Add a zx297520v3 reset driver Stefan Dösinger
2026-08-02 21:04   ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 12/12] ARM: dts: zte: Declare zx297520v3 CRM device nodes Stefan Dösinger
2026-08-02 21:03   ` 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=20260802204238.1AEB51F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mfd@lists.linux.dev \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=stefandoesinger@gmail.com \
    --cc=vkoul@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox