[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c1c65437-a80c-473c-8c93-c7bf947f703a@web.de>
Date: Sat, 18 Oct 2025 11:50:36 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Anand Moon <linux.amoon@...il.com>, linux-pci@...r.kernel.org,
linux-rockchip@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Heiko Stübner
<heiko@...ech.de>, Krzysztof Wilczyński
<kwilczynski@...nel.org>, Lorenzo Pieralisi <lpieralisi@...nel.org>,
Manivannan Sadhasivam <mani@...nel.org>, Rob Herring <robh@...nel.org>,
Shawn Lin <shawn.lin@...k-chips.com>, LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] PCI: rockchip: Propagate dev_err_probe return value
>> 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
Powered by blists - more mailing lists