From: sashiko-bot@kernel.org
To: "Yuho Choi" <dbgh9129@gmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v1] PCI: xgene: Use managed clock for PCIe controller
Date: Sun, 02 Aug 2026 22:19:07 +0000 [thread overview]
Message-ID: <20260802221907.DF1B61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260802221146.573233-1-dbgh9129@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Spurious error messages logged when `devm_clk_get_enabled()` returns `-EPROBE_DEFER`.
--
--- Patch [1]: [PATCH v1] PCI: xgene: Use managed clock for PCIe controller ---
commit 0cead2017a15cf2ef3dd587c853cc1410cad1d70
Author: Yuho Choi <dbgh9129@gmail.com>
PCI: xgene: Use managed clock for PCIe controller
This commit simplifies the xgene PCIe port initialization by replacing
manual clock retrieval and enablement with devm_clk_get_enabled(). This
automatically handles unwinding the clock on probe failure and device removal.
> diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c
> --- a/drivers/pci/controller/pci-xgene.c
> +++ b/drivers/pci/controller/pci-xgene.c
> @@ -321,18 +321,11 @@ static void xgene_pcie_linkup(struct xgene_pcie *port,
> static int xgene_pcie_init_port(struct xgene_pcie *port)
> {
> struct device *dev = port->dev;
> - int rc;
>
> - port->clk = clk_get(dev, NULL);
> + port->clk = devm_clk_get_enabled(dev, NULL);
> if (IS_ERR(port->clk)) {
> dev_err(dev, "clock not available\n");
> - return -ENODEV;
> - }
> -
> - rc = clk_prepare_enable(port->clk);
> - if (rc) {
> - dev_err(dev, "clock enable failed\n");
> - return rc;
> + return PTR_ERR(port->clk);
[Severity: Medium]
Does this unconditional dev_err() cause log spam during boot if
devm_clk_get_enabled() returns -EPROBE_DEFER?
Could dev_err_probe() be used here instead?
> }
>
> return 0;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260802221146.573233-1-dbgh9129@gmail.com?part=1
prev parent reply other threads:[~2026-08-02 22:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 22:11 [PATCH v1] PCI: xgene: Use managed clock for PCIe controller Yuho Choi
2026-08-02 22:19 ` 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=20260802221907.DF1B61F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dbgh9129@gmail.com \
--cc=linux-pci@vger.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