Message ID | 20250403154326411S4luMrK8A5RXovincATzF@zte.com.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drivers: pci: controller: pcie-rockchip: Use dev_err_probe() | expand |
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
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
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; }