From: sashiko-bot@kernel.org
To: "Markus Elfring" <Markus.Elfring@web.de>, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2] PCI: xilinx-nwl: Use devm_clk_get_enabled() in nwl_pcie_probe()
Date: Fri, 04 Dec 2026 14:37:37 +0000 [thread overview]
Message-ID: <sashiko-outbox-249989@kernel.org> (raw)
In-Reply-To: <4d62f3cc-f1da-46ea-aab7-1c69770399b3@web.de>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Low] PCI: xilinx-nwl: commit message lacks rationale and prose
formatting
- [Low] PCI: xilinx-nwl: unused clk field retained in struct nwl_pcie
- [Low] PCI: xilinx-nwl: dropped error log on clock failure in
nwl_pcie_probe()
--
commit ea3dc9c7727e38909d19bde17e7137893bae16bc
Author: Markus Elfring <elfring@users.sourceforge.net>
> PCI: xilinx-nwl: Use devm_clk_get_enabled() in nwl_pcie_probe()
>
> Replace the combination of devm_clk_get() and clk_prepare_enable()
> by a devm_clk_get_enabled() call.
> Delete a clk_disable_unprepare() call on an error handling path
> and in the implementation of the function “nwl_pcie_remove”.
> Drop the label “err_clk”.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
[Severity: Low]
As reported by Manivannan Sadhasivam on v1 [1], the commit message should
be contiguous prose explaining what the patch does and why it is needed,
rather than listing edits line by line and calling this cleanup an issue
detected by Coccinelle.
It also omits mentioning that the dev_err() message on clock enable failure
is removed.
> diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c
> index 0dee19fa24ca3..fd134317e9c48 100644
> --- a/drivers/pci/controller/pcie-xilinx-nwl.c
> +++ b/drivers/pci/controller/pcie-xilinx-nwl.c
> @@ -844,20 +844,14 @@ static int nwl_pcie_probe(struct platform_device *pdev)
> return err;
> }
>
> - pcie->clk = devm_clk_get(dev, NULL);
> + pcie->clk = devm_clk_get_enabled(dev, NULL);
> if (IS_ERR(pcie->clk))
> return PTR_ERR(pcie->clk);
[Severity: Low]
Is the clk field in struct nwl_pcie still needed? With both
clk_disable_unprepare() calls removed from nwl_pcie_probe() and
nwl_pcie_remove(), pcie->clk is never read outside this check, so a local
struct clk *clk variable can be used instead and the struct member dropped.
> - err = clk_prepare_enable(pcie->clk);
> - if (err) {
> - dev_err(dev, "can't enable PCIe ref clock\n");
> - return err;
> - }
[Severity: Low]
Should this preserve an error log when getting or enabling the clock fails?
devm_clk_get_enabled() does not print an error on failure, so returning
PTR_ERR(pcie->clk) silently drops the diagnostic message. Using
dev_err_probe() would keep the failure log while handling -EPROBE_DEFER.
[1] https://lore.kernel.org/r/179562889095.5580.5805178037943195830.b4-reply@b4
--
Sashiko AI review · https://sashiko.dev/#/patchset/4d62f3cc-f1da-46ea-aab7-1c69770399b3@web.de?part=1
next prev parent reply other threads:[~2026-12-04 14:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 14:22 [PATCH v2] PCI: xilinx-nwl: Use devm_clk_get_enabled() in nwl_pcie_probe() Markus Elfring
2026-12-04 14:37 ` sashiko-bot [this message]
2026-12-04 17:27 ` Frank Li
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=sashiko-outbox-249989@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Markus.Elfring@web.de \
--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 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.