PCI: rockchip: Improve error handling in clock return value
PATCH 1/1 PCI: rockchip: Improve error handling in clock return value
Updates the error message to include the actual return value of devm_clk_bulk_get_all, which provides more context for debugging and troubleshooting the root cause of clock retrieval failures.
--- drivers/pci/controller/pcie-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/controller/pcie-rockchip.c +2 -1
@@ -99,7 +99,8 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) rockchip->num_clks =devm_clk_bulk_get_all (dev, &rockchip->clks);if (rockchip->num_clks <0 ) -return dev_err_probe (dev, err,"failed to get clocks\n" ); +return dev_err_probe (dev, rockchip->num_clks, +"failed to get clocks\n" );return 0 ; }
Signature · 1 line
2.47.1
On Mon, Jan 06, 2025 at 09:00:38PM +0530, Anand Moon wrote:
Subject should include the word 'fix' not 'improve'
Quoted 1 line
Updates the error message to include the actual return value of
s/Updates/Update (imperative form)
Quoted 3 lines
devm_clk_bulk_get_all, which provides more context for debugging and troubleshooting the root cause of clock retrieval failures.
Btw, it is not just updating the error message, it also returns the actual error code.
- Mani
Quoted 24 lines
Reported-by Dan Carpenter <[email protected]>Signed-off-by Anand Moon <[email protected]>--- drivers/pci/controller/pcie-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/pci/controller/pcie-rockchip.c +2
-1@@ -99,7 +99,8 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) rockchip->num_clks =devm_clk_bulk_get_all (dev, &rockchip->clks);if (rockchip->num_clks <0 ) -return dev_err_probe (dev, err,"failed to get clocks\n" ); +return dev_err_probe (dev, rockchip->num_clks, +"failed to get clocks\n" );return 0 ; }Signature · 1 line
2.47.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 6 lines · Manivannan Sadhasivam
On Mon, Jan 06, 2025 at 09:00:38PM +0530, Anand Moon wrote:
Subject should include the word 'fix' not 'improve'
Quoted 1 line
Updates the error message to include the actual return value of
Quoted 7 lines
s/Updates/Update (imperative form)
Quoted 2 lines
devm_clk_bulk_get_all, which provides more context for debugging and troubleshooting the root cause of clock retrieval failures.Btw, it is not just updating the error message, it also returns the actual error code.
Already squashed into
https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?id=abdd4c8ea7d7,
sorry I didn't mention that here.
Quoted 27 lines
Quoted 24 lines
Reported-by Dan Carpenter <[email protected]>Signed-off-by Anand Moon <[email protected]>--- drivers/pci/controller/pcie-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/pci/controller/pcie-rockchip.c +2
-1@@ -99,7 +99,8 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) rockchip->num_clks =devm_clk_bulk_get_all (dev, &rockchip->clks);if (rockchip->num_clks <0 ) -return dev_err_probe (dev, err,"failed to get clocks\n" ); +return dev_err_probe (dev, rockchip->num_clks, +"failed to get clocks\n" );return 0 ; }Signature · 1 line
2.47.1Signature · 1 line
மணிவண்ணன் சதாசிவம்
Hi Mani/ Bjon,
Quoted 8 lines · Bjorn Helgaas
Quoted 6 lines · Manivannan Sadhasivam
On Mon, Jan 06, 2025 at 09:00:38PM +0530, Anand Moon wrote:
Subject should include the word 'fix' not 'improve'
Quoted 1 line
Updates the error message to include the actual return value of
Quoted 7 lines
Quoted 7 lines
s/Updates/Update (imperative form)
Quoted 2 lines
devm_clk_bulk_get_all, which provides more context for debugging and troubleshooting the root cause of clock retrieval failures.Btw, it is not just updating the error message, it also returns the actual error code.
correct.
Quoted 5 lines
Already squashed into
https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?id=abdd4c8ea7d7,
sorry I didn't mention that here.
Thanks,
I will focus on improving my communication skills and delivering impactful commit messages in the future.
Thank
-Anand