From: sashiko-bot@kernel.org
To: "Stefan Dösinger" <stefandoesinger@gmail.com>
Cc: neil.armstrong@linaro.org, devicetree@vger.kernel.org,
robh@kernel.org, mfd@lists.linux.dev, vkoul@kernel.org,
olteanv@gmail.com, conor+dt@kernel.org,
linux-phy@lists.infradead.org, lee@kernel.org
Subject: Re: [PATCH v8 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks
Date: Mon, 27 Jul 2026 19:41:34 +0000 [thread overview]
Message-ID: <20260727194134.EFFDD1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727-zx29clk-v8-9-7a107b00f1dd@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The use of `clk_main[0]` to initialize fields in static global arrays is invalid C and causes a compilation error.
--
--- Patch [9]: [PATCH v8 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks ---
commit 895d095e9e21d84eaefefb2e2881a4f8193ef450
Author: Stefan Dösinger <stefandoesinger@gmail.com>
clk: zte: Introduce a driver for zx297520v3 matrix clocks
This commit introduces a new clock driver for the zx297520v3 matrix clock
controller, which manages high-speed devices such as CPU, DMA, RAM, SDIO,
and Ethernet. It registers multiplexers, fixed dividers, and gates within
the controller.
> diff --git a/drivers/clk/zte/clk-zx297520v3.c b/drivers/clk/zte/clk-zx297520v3.c
> index 4444c2eb13825..9299449097b4a 100644
> --- a/drivers/clk/zte/clk-zx297520v3.c
> +++ b/drivers/clk/zte/clk-zx297520v3.c
[ ... ]
> @@ -542,6 +542,340 @@ static const struct zx_clk_data zx297520v3_topclk_data = {
[ ... ]
> +static const struct zx_gate_desc zx297520v3_matrix_gates[] = {
[ ... ]
> + /* Both 0x24 and 0x28 bits 1 and 2 stop the CPU. There is also a bit in topclk+0x138, which
> + * ZTE's uboot calls "A53 reset", which also stops the CPU. I can't really tell the
> + * difference between matrix+0x28 and top+0x138. The clock (matrix+0x24) can be disabled
> + * and enabled from the Cortex M0 and it will nicely stop and restart the A53, retaining
> + * all state.
> + */
> + GATE(ZX297520V3_CPU_WCLK, "cpu-wclk", "cpu-mux", 0x24, 1,
> + CLK_IS_CRITICAL),
> + GATE(ZX297520V3_CPU_PCLK, "cpu-pclk", clk_main[0], 0x24, 2,
> + CLK_IS_CRITICAL),
[Severity: Low]
Does this cause a compilation error? In C, static array initializers must
use constant expressions. Accessing an array element like clk_main[0] requires
reading memory, which is not considered a constant expression by the compiler,
and will likely result in an initializer element is not constant build error.
This pattern also appears in several other GATE definitions further down in
the zx297520v3_matrix_gates array.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-zx29clk-v8-0-7a107b00f1dd@gmail.com?part=9
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-07-27 19:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 18:24 [PATCH v8 00/12] ZTE zx297520v3 clock bindings and driver Stefan Dösinger
2026-07-27 18:24 ` [PATCH v8 01/12] dt-bindings: clk: zte: Add zx297520v3 top clock and reset controller Stefan Dösinger
2026-07-27 18:32 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 02/12] dt-bindings: clk: zte: Add zx297520v3 matrix " Stefan Dösinger
2026-07-27 18:34 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 03/12] dt-bindings: clk: zte: Add zx297520v3 LSP " Stefan Dösinger
2026-07-27 18:36 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 04/12] mfd: zx297520v3: Add a clock and reset MFD driver Stefan Dösinger
2026-07-27 18:41 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 05/12] clk: zte: Add Clock registration infrastructure Stefan Dösinger
2026-07-27 18:52 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 06/12] clk: zte: Add regmap-based clocks Stefan Dösinger
2026-07-27 19:03 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 07/12] clk: zte: Add zx PLL support infrastructure Stefan Dösinger
2026-07-27 19:15 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 08/12] clk: zte: Introduce a driver for zx297520v3 top clocks Stefan Dösinger
2026-07-27 19:29 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks Stefan Dösinger
2026-07-27 19:41 ` sashiko-bot [this message]
2026-07-27 18:24 ` [PATCH v8 10/12] clk: zte: Introduce a driver for zx297520v3 LSP clocks Stefan Dösinger
2026-07-27 19:46 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 11/12] reset: zte: Add a zx297520v3 reset driver Stefan Dösinger
2026-07-27 19:59 ` sashiko-bot
2026-07-27 18:24 ` [PATCH v8 12/12] ARM: dts: zte: Declare zx297520v3 CRM device nodes Stefan Dösinger
2026-07-27 20:13 ` 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=20260727194134.EFFDD1F000E9@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