From: Markus Elfring <Markus.Elfring@web.de>
To: Anand Moon <linux.amoon@gmail.com>,
linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Shawn Lin" <shawn.lin@rock-chips.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] PCI: rockchip: Propagate dev_err_probe return value
Date: Sat, 18 Oct 2025 11:50:36 +0200 [thread overview]
Message-ID: <c1c65437-a80c-473c-8c93-c7bf947f703a@web.de> (raw)
In-Reply-To: <CANAwSgQEqv2a1MGkGtj8CpXSKOXv=_wV3afOgn=iri7uqnj1bw@mail.gmail.com>
>> I find the change description improvable.
>>
> Ok, is this ok?
I present other wording preferences.
> When using the dev_err_probe() helper function in rockchip_pcie_init_port(),
> ensure its return value is consistently assigned to the return variable.
I hope that we can achieve consensus on the corresponding source code places.
https://elixir.bootlin.com/linux/v6.17.1/source/drivers/pci/controller/pcie-rockchip.c#L115-L202
> This guarantees that the original error code, whether it's a specific error
> or -EPROBE_DEFER,
> is correctly propagated up the call stack for proper error handling
> and debugging.
The mentioned programming interface should be applied correctly.
>> Would an other source code variant become more desirable?
>> https://elixir.bootlin.com/linux/v6.17.1/source/drivers/base/core.c#L5031-L5075
>>
>> err = dev_err_probe(dev,
>> reset_control_bulk_assert(ROCKCHIP_NUM_CORE_RSTS, rockchip->core_rsts),
>> "Couldn't assert Core resets\n");
>> if (err)
>> goto err_exit_phy;
> No, the correct code ensures that dev_err_probe() is only called when
> an actual error has
> occurred, providing a clear and accurate log entry. …
Do you think that anything different would happen according to my transformation suggestion?
Regards,
Markus
next prev parent reply other threads:[~2025-10-18 9:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 6:11 [PATCH v1] PCI: rockchip: Propagate dev_err_probe return value Anand Moon
2025-10-18 7:15 ` [PATCH] " Markus Elfring
2025-10-18 7:39 ` Markus Elfring
2025-10-18 9:05 ` Anand Moon
2025-10-18 9:50 ` Markus Elfring [this message]
2025-10-31 8:26 ` [PATCH v1] " Manivannan Sadhasivam
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=c1c65437-a80c-473c-8c93-c7bf947f703a@web.de \
--to=markus.elfring@web.de \
--cc=bhelgaas@google.com \
--cc=heiko@sntech.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux.amoon@gmail.com \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.com \
/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;
as well as URLs for NNTP newsgroup(s).