* [PATCH] PCI: dw-rockchip: Remove redundant dev_err()
@ 2024-09-18 7:44 Chen Ni
2024-09-18 8:21 ` Heiko Stuebner
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Chen Ni @ 2024-09-18 7:44 UTC (permalink / raw)
To: lpieralisi, kw, manivannan.sadhasivam, robh, bhelgaas, heiko,
cassel, ukleinek, dlemoal, yoshihiro.shimoda.uh
Cc: linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel,
Chen Ni
There is no need to call the dev_err() function directly to print a
custom message when handling an error from platform_get_irq_byname()
function as it is going to display an appropriate error message in case
of a failure.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
index 1170e1107508..3770e566b597 100644
--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -450,10 +450,8 @@ static int rockchip_pcie_configure_ep(struct platform_device *pdev,
return -ENODEV;
irq = platform_get_irq_byname(pdev, "sys");
- if (irq < 0) {
- dev_err(dev, "missing sys IRQ resource\n");
+ if (irq < 0)
return irq;
- }
ret = devm_request_threaded_irq(dev, irq, NULL,
rockchip_pcie_ep_sys_irq_thread,
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Remove redundant dev_err()
2024-09-18 7:44 Chen Ni
@ 2024-09-18 8:21 ` Heiko Stuebner
2024-09-24 14:21 ` Manivannan Sadhasivam
2024-10-06 7:39 ` Markus Elfring
2 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2024-09-18 8:21 UTC (permalink / raw)
To: lpieralisi, kw, manivannan.sadhasivam, robh, bhelgaas, cassel,
ukleinek, dlemoal, yoshihiro.shimoda.uh, Chen Ni
Cc: linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel,
Chen Ni
Am Mittwoch, 18. September 2024, 09:44:01 CEST schrieb Chen Ni:
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from platform_get_irq_byname()
> function as it is going to display an appropriate error message in case
> of a failure.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Remove redundant dev_err()
2024-09-18 7:44 Chen Ni
2024-09-18 8:21 ` Heiko Stuebner
@ 2024-09-24 14:21 ` Manivannan Sadhasivam
2024-10-06 7:39 ` Markus Elfring
2 siblings, 0 replies; 7+ messages in thread
From: Manivannan Sadhasivam @ 2024-09-24 14:21 UTC (permalink / raw)
To: Chen Ni
Cc: lpieralisi, kw, robh, bhelgaas, heiko, cassel, ukleinek, dlemoal,
yoshihiro.shimoda.uh, linux-pci, linux-arm-kernel, linux-rockchip,
linux-kernel
On Wed, Sep 18, 2024 at 03:44:01PM +0800, Chen Ni wrote:
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from platform_get_irq_byname()
> function as it is going to display an appropriate error message in case
> of a failure.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
- Mani
> ---
> drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index 1170e1107508..3770e566b597 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -450,10 +450,8 @@ static int rockchip_pcie_configure_ep(struct platform_device *pdev,
> return -ENODEV;
>
> irq = platform_get_irq_byname(pdev, "sys");
> - if (irq < 0) {
> - dev_err(dev, "missing sys IRQ resource\n");
> + if (irq < 0)
> return irq;
> - }
>
> ret = devm_request_threaded_irq(dev, irq, NULL,
> rockchip_pcie_ep_sys_irq_thread,
> --
> 2.25.1
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Remove redundant dev_err()
2024-09-18 7:44 Chen Ni
2024-09-18 8:21 ` Heiko Stuebner
2024-09-24 14:21 ` Manivannan Sadhasivam
@ 2024-10-06 7:39 ` Markus Elfring
2 siblings, 0 replies; 7+ messages in thread
From: Markus Elfring @ 2024-10-06 7:39 UTC (permalink / raw)
To: Chen Ni, linux-rockchip, linux-arm-kernel, linux-pci,
Bjorn Helgaas, Damien Le Moal, Heiko Stübner,
Krzysztof Wilczyński, Lorenzo Pieralisi,
Manivannan Sadhasivam, Niklas Cassel, Rob Herring,
Uwe Kleine-König, Yoshihiro Shimoda
Cc: LKML, kernel-janitors
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from platform_get_irq_byname()
> function as it is going to display an appropriate error message in case
call?
> of a failure.
Were any static source code analysis tools involved in the detection
of the presented change possibility?
By the way:
Such a patch can be generated also by the means of the semantic patch
language (Coccinelle software) for example.
Regards,
Markus
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] PCI: dw-rockchip: Remove redundant dev_err()
@ 2026-10-21 10:14 Diederik de Haas
2026-10-21 10:17 ` sashiko-bot
2026-10-21 12:35 ` Heiko Stübner
0 siblings, 2 replies; 7+ messages in thread
From: Diederik de Haas @ 2026-10-21 10:14 UTC (permalink / raw)
To: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Bjorn Helgaas, Heiko Stuebner
Cc: Rob Herring, linux-pci, linux-arm-kernel, linux-rockchip,
linux-kernel, Diederik de Haas
The devm_request_threaded_irq() function already automatically logs
detailed error messages on failure since commit
55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()")
So remove the now-redundant driver-specific dev_err() calls.
Signed-off-by: Diederik de Haas <diederik@cknow-tech.com>
---
drivers/pci/controller/dwc/pcie-dw-rockchip.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
index 14976861f8ef..a4dbfc52c2f1 100644
--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -718,10 +718,8 @@ static int rockchip_pcie_configure_rc(struct platform_device *pdev,
ret = devm_request_threaded_irq(dev, irq, NULL,
rockchip_pcie_rc_sys_irq_thread,
IRQF_ONESHOT, "pcie-sys-rc", rockchip);
- if (ret) {
- dev_err(dev, "failed to request PCIe sys IRQ\n");
+ if (ret)
return ret;
- }
/* LTSSM enable control mode */
val = FIELD_PREP_WM16(PCIE_LTSSM_ENABLE_ENHANCE, 1);
@@ -764,10 +762,8 @@ static int rockchip_pcie_configure_ep(struct platform_device *pdev,
ret = devm_request_threaded_irq(dev, irq, NULL,
rockchip_pcie_ep_sys_irq_thread,
IRQF_ONESHOT, "pcie-sys-ep", rockchip);
- if (ret) {
- dev_err(dev, "failed to request PCIe sys IRQ\n");
+ if (ret)
return ret;
- }
/*
* LTSSM enable control mode, and automatically delay link training on
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Remove redundant dev_err()
2026-10-21 10:14 [PATCH] PCI: dw-rockchip: Remove redundant dev_err() Diederik de Haas
@ 2026-10-21 10:17 ` sashiko-bot
2026-10-21 12:35 ` Heiko Stübner
1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-10-21 10:17 UTC (permalink / raw)
To: Diederik de Haas; +Cc: linux-pci
> The devm_request_threaded_irq() function already automatically logs
> detailed error messages on failure since commit
> 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()")
> So remove the now-redundant driver-specific dev_err() calls.
>
> Signed-off-by: Diederik de Haas <diederik@cknow-tech.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261021101533.609118-1-diederik@cknow-tech.com?part=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Remove redundant dev_err()
2026-10-21 10:14 [PATCH] PCI: dw-rockchip: Remove redundant dev_err() Diederik de Haas
2026-10-21 10:17 ` sashiko-bot
@ 2026-10-21 12:35 ` Heiko Stübner
1 sibling, 0 replies; 7+ messages in thread
From: Heiko Stübner @ 2026-10-21 12:35 UTC (permalink / raw)
To: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Bjorn Helgaas, Diederik de Haas
Cc: Rob Herring, linux-pci, linux-arm-kernel, linux-rockchip,
linux-kernel, Diederik de Haas
Am Mittwoch, 21. Oktober 2026, 12:14:57 Mitteleuropäische Sommerzeit schrieb Diederik de Haas:
> The devm_request_threaded_irq() function already automatically logs
> detailed error messages on failure since commit
> 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()")
> So remove the now-redundant driver-specific dev_err() calls.
>
> Signed-off-by: Diederik de Haas <diederik@cknow-tech.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-10-21 12:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 10:14 [PATCH] PCI: dw-rockchip: Remove redundant dev_err() Diederik de Haas
2026-10-21 10:17 ` sashiko-bot
2026-10-21 12:35 ` Heiko Stübner
-- strict thread matches above, loose matches on Subject: below --
2024-09-18 7:44 Chen Ni
2024-09-18 8:21 ` Heiko Stuebner
2024-09-24 14:21 ` Manivannan Sadhasivam
2024-10-06 7:39 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox