linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PCI: dw-rockchip: remove redundant dev_err
@ 2025-01-06  8:14 Pei Xiao
  2025-01-06 11:36 ` Niklas Cassel
  2025-01-15 11:28 ` Krzysztof Wilczyński
  0 siblings, 2 replies; 3+ messages in thread
From: Pei Xiao @ 2025-01-06  8:14 UTC (permalink / raw)
  To: linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel, cassel,
	lpieralisi, kw, heiko
  Cc: Pei Xiao, kernel test robot

dev_err is redundant because platform_get_irq_byname() already prints an
error.

cocci warnings:
	drivers/pci/controller/dwc/pcie-dw-rockchip.c:454:2-9:line 454 is
redundant because platform_get_irq() already prints an error

so remove redundant dev_err.

Fixes: 8719dbc54668 ("PCI: dw-rockchip: Enumerate endpoints based on dll_link_up irq in the combined sys irq")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412312343.najrW1Db-lkp@intel.com/
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
V2:add to pci list
---
 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 ce4b511bff9b..a9795866e915 100644
--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -458,10 +458,8 @@ static int rockchip_pcie_configure_rc(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_rc_sys_irq_thread,
@@ -504,10 +502,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] 3+ messages in thread

* Re: [PATCH v2] PCI: dw-rockchip: remove redundant dev_err
  2025-01-06  8:14 [PATCH v2] PCI: dw-rockchip: remove redundant dev_err Pei Xiao
@ 2025-01-06 11:36 ` Niklas Cassel
  2025-01-15 11:28 ` Krzysztof Wilczyński
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Cassel @ 2025-01-06 11:36 UTC (permalink / raw)
  To: Pei Xiao
  Cc: linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel,
	lpieralisi, kw, heiko, kernel test robot

On Mon, Jan 06, 2025 at 04:14:04PM +0800, Pei Xiao wrote:
> dev_err is redundant because platform_get_irq_byname() already prints an
> error.
> 
> cocci warnings:
> 	drivers/pci/controller/dwc/pcie-dw-rockchip.c:454:2-9:line 454 is
> redundant because platform_get_irq() already prints an error
> 
> so remove redundant dev_err.
> 
> Fixes: 8719dbc54668 ("PCI: dw-rockchip: Enumerate endpoints based on dll_link_up irq in the combined sys irq")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202412312343.najrW1Db-lkp@intel.com/
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
> V2:add to pci list
> ---
>  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 ce4b511bff9b..a9795866e915 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -458,10 +458,8 @@ static int rockchip_pcie_configure_rc(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_rc_sys_irq_thread,
> @@ -504,10 +502,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
> 

Reviewed-by: Niklas Cassel <cassel@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] PCI: dw-rockchip: remove redundant dev_err
  2025-01-06  8:14 [PATCH v2] PCI: dw-rockchip: remove redundant dev_err Pei Xiao
  2025-01-06 11:36 ` Niklas Cassel
@ 2025-01-15 11:28 ` Krzysztof Wilczyński
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2025-01-15 11:28 UTC (permalink / raw)
  To: Pei Xiao
  Cc: linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel, cassel,
	lpieralisi, heiko, kernel test robot

Hello,

> dev_err is redundant because platform_get_irq_byname() already prints an
> error.
> 
> cocci warnings:
> 	drivers/pci/controller/dwc/pcie-dw-rockchip.c:454:2-9:line 454 is
> redundant because platform_get_irq() already prints an error
> 
> so remove redundant dev_err.

Applied to controller/dwc for v6.14, thank you!

	Krzysztof


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-15 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06  8:14 [PATCH v2] PCI: dw-rockchip: remove redundant dev_err Pei Xiao
2025-01-06 11:36 ` Niklas Cassel
2025-01-15 11:28 ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).