From: Markus Elfring <Markus.Elfring@web.de>
To: "Anand Moon" <linux.amoon@gmail.com>,
linux-pci@vger.kernel.org, "Bjorn Helgaas" <bhelgaas@google.com>,
"Kevin Xie" <kevin.xie@starfivetech.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] PCI: starfive: Propagate dev_err_probe return value
Date: Sat, 18 Oct 2025 10:24:28 +0200 [thread overview]
Message-ID: <b362115c-6853-4047-b4c2-aad97ccf8c31@web.de> (raw)
In-Reply-To: <20251017161425.7390-1-linux.amoon@gmail.com>
> Ensure that the return value from dev_err_probe() is consistently assigned
> back to return in all error paths within starfive_pcie_clk_rst_init() and
> starfive_pcie_enable_phy() function. This ensures the original error code
> are propagation for debugging.
I find the change description improvable.
I propose to take another source code transformation approach better into account.
https://elixir.bootlin.com/linux/v6.17.1/source/drivers/base/core.c#L5031-L5075
Example:
https://elixir.bootlin.com/linux/v6.17.1/source/drivers/pci/controller/plda/pcie-starfive.c#L171-L187
ret = dev_err_probe(dev, reset_control_deassert(pcie->resets),
"failed to deassert resets\n");
if (ret)
clk_bulk_disable_unprepare(pcie->num_clks, pcie->clks);
How do you think about to achieve such a source code variant also with the help of
the semantic patch language (Coccinelle software)?
Regards,
Markus
prev parent reply other threads:[~2025-10-18 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 16:14 [PATCH v1] PCI: starfive: Propagate dev_err_probe return value Anand Moon
2025-10-18 8:24 ` Markus Elfring [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=b362115c-6853-4047-b4c2-aad97ccf8c31@web.de \
--to=markus.elfring@web.de \
--cc=bhelgaas@google.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kevin.xie@starfivetech.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@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