Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Zhipeng.wang_1@oss.nxp.com
Cc: robh@kernel.org, Frank.Li@kernel.org, conor+dt@kernel.org,
	imx@lists.linux.dev, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 3/3] clk: imx: imx8qxp: add soft dependency on SCU power domain driver
Date: Wed, 22 Jul 2026 08:35:09 +0000	[thread overview]
Message-ID: <20260722083510.500511F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260722082522.3747962-4-Zhipeng.wang_1@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

New issues:
- [High] The `MODULE_SOFTDEP` declaration specifies an incorrect module name, rendering the fix completely ineffective.

Pre-existing issues:
- [High] Ignoring -EPROBE_DEFER causes silent device registration without power domains, leading to hardware exceptions.
--

--- Patch [3]: [PATCH v4 3/3] clk: imx: imx8qxp: add soft dependency on SCU power domain driver ---
commit f47fec3b0de49112a338b6cde236c5713303a35f
Author: Zhipeng Wang <zhipeng.wang_1@nxp.com>

clk: imx: imx8qxp: add soft dependency on SCU power domain driver

This commit adds a soft dependency on the SCU power domain module to ensure
it is loaded before the i.MX8QXP clock driver. This attempts to work around
silent failures when attaching power domains during device initialization.

> diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
> index c781425a005ef..23ef6b959dee8 100644
> --- a/drivers/clk/imx/clk-imx8qxp.c
> +++ b/drivers/clk/imx/clk-imx8qxp.c
> @@ -373,3 +373,4 @@ module_exit(imx8qxp_clk_exit);
>  MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>");
>  MODULE_DESCRIPTION("NXP i.MX8QXP clock driver");
>  MODULE_LICENSE("GPL v2");
> +MODULE_SOFTDEP("pre: imx_scu_pd");

[Severity: High]
Does this soft dependency specify the correct module name?

The Makefile entry obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o typically results
in a module named scu-pd (or scu_pd). When modprobe parses imx_scu_pd,
it won't find the module, ignoring the dependency and rendering the
workaround ineffective.

[Severity: High]
This isn't a bug introduced by this patch, but the patch relies on a module
load workaround rather than fixing the root cause of the probe order issue.

In drivers/clk/imx/clk-scu.c, imx_clk_scu_alloc_dev() silently ignores
errors from imx_clk_scu_attach_pd():

    ret = imx_clk_scu_attach_pd(&pdev->dev, rsrc_id);
    if (ret)
        pr_warn("%s: failed to attached the power domain %d\n",
                name, ret);

If the power domain provider probes after the clock provider or defers its
probe, of_genpd_add_device() returns -EPROBE_DEFER. Because this error
is ignored, clocks are registered without power domains attached, leading to
hardware exceptions or power leaks when those clocks are accessed.

Should the -EPROBE_DEFER error be propagated up the call stack instead?

This would allow the standard kernel deferral mechanism to reliably enforce
the initialization ordering, handling manual module loads and provider probe
deferrals gracefully without relying on MODULE_SOFTDEP.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260722082522.3747962-1-Zhipeng.wang_1@oss.nxp.com?part=3

      reply	other threads:[~2026-07-22  8:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  8:25 [PATCH v4 0/3] pmdomain: imx: build the SCU power domain driver as a module Zhipeng.wang_1
2026-07-22  8:25 ` [PATCH v4 1/3] of: export of_stdout symbol Zhipeng.wang_1
2026-07-22  8:25 ` [PATCH v4 2/3] pmdomain: imx: scu-pd: allow building as a module Zhipeng.wang_1
2026-07-22  8:38   ` sashiko-bot
2026-07-22  8:25 ` [PATCH v4 3/3] clk: imx: imx8qxp: add soft dependency on SCU power domain driver Zhipeng.wang_1
2026-07-22  8:35   ` sashiko-bot [this message]

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=20260722083510.500511F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=Zhipeng.wang_1@oss.nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --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