* [PATCH] drivers: pci: controller: pcie-rockchip: Use dev_err_probe()
@ 2025-04-03 7:43 shao.mingyin
2025-04-04 6:09 ` Krzysztof Kozlowski
0 siblings, 1 reply; 3+ messages in thread
From: shao.mingyin @ 2025-04-03 7:43 UTC (permalink / raw)
To: shawn.lin
Cc: yang.yang29, xu.xin16, ye.xingchen, lpieralisi, kw,
manivannan.sadhasivam, robh, bhelgaas, heiko, linux-pci,
linux-rockchip, linux-arm-kernel, linux-kernel, zhang.enpei
From: Zhang Enpei <zhang.enpei@zte.com.cn>
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
drivers/pci/controller/pcie-rockchip.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/controller/pcie-rockchip.c b/drivers/pci/controller/pcie-rockchip.c
index 0f88da378805..9897824a81f8 100644
--- a/drivers/pci/controller/pcie-rockchip.c
+++ b/drivers/pci/controller/pcie-rockchip.c
@@ -230,12 +230,9 @@ int rockchip_pcie_get_phys(struct rockchip_pcie *rockchip)
phy = devm_of_phy_get(dev, dev->of_node, name);
kfree(name);
- if (IS_ERR(phy)) {
- if (PTR_ERR(phy) != -EPROBE_DEFER)
- dev_err(dev, "missing phy for lane %d: %ld\n",
- i, PTR_ERR(phy));
- return PTR_ERR(phy);
- }
+ if (IS_ERR(phy))
+ return dev_err_probe(dev, PTR_ERR(phy),
+ "missing phy for lane %d\n", i);
rockchip->phys[i] = phy;
}
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: pci: controller: pcie-rockchip: Use dev_err_probe()
2025-04-03 7:43 [PATCH] drivers: pci: controller: pcie-rockchip: Use dev_err_probe() shao.mingyin
@ 2025-04-04 6:09 ` Krzysztof Kozlowski
2025-04-04 12:52 ` Manivannan Sadhasivam
0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-04 6:09 UTC (permalink / raw)
To: shao.mingyin, shawn.lin
Cc: yang.yang29, xu.xin16, ye.xingchen, lpieralisi, kw,
manivannan.sadhasivam, robh, bhelgaas, heiko, linux-pci,
linux-rockchip, linux-arm-kernel, linux-kernel, zhang.enpei
On 03/04/2025 09:43, shao.mingyin@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
>
> Replace the open-code with dev_err_probe() to simplify the code.
>
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
> ---
Considering zte is sending untested patches from poor automation (or AI
generated), this might be correct or might not be because it does not
look like probe path.
Anyway, don't send patch by patch and line by line. Why you did not
decide to fix all of the places in these drivers?
NAK
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: pci: controller: pcie-rockchip: Use dev_err_probe()
2025-04-04 6:09 ` Krzysztof Kozlowski
@ 2025-04-04 12:52 ` Manivannan Sadhasivam
0 siblings, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2025-04-04 12:52 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: shao.mingyin, shawn.lin, yang.yang29, xu.xin16, ye.xingchen,
lpieralisi, kw, robh, bhelgaas, heiko, linux-pci, linux-rockchip,
linux-arm-kernel, linux-kernel, zhang.enpei
On Fri, Apr 04, 2025 at 08:09:40AM +0200, Krzysztof Kozlowski wrote:
> On 03/04/2025 09:43, shao.mingyin@zte.com.cn wrote:
> > From: Zhang Enpei <zhang.enpei@zte.com.cn>
> >
> > Replace the open-code with dev_err_probe() to simplify the code.
> >
> > Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> > Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
> > ---
> Considering zte is sending untested patches from poor automation (or AI
> generated), this might be correct or might not be because it does not
> look like probe path.
>
> Anyway, don't send patch by patch and line by line. Why you did not
> decide to fix all of the places in these drivers?
>
To bump up the contribution maybe :P
But to reiterate what Krzysztof said, please send patches only after fixing all
identical issues in the driver. Patches should be split only when the fixes are
non-identical.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-04 12:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-03 7:43 [PATCH] drivers: pci: controller: pcie-rockchip: Use dev_err_probe() shao.mingyin
2025-04-04 6:09 ` Krzysztof Kozlowski
2025-04-04 12:52 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®