All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: cbb: Remove unnecessary print function dev_err()
@ 2022-11-06 14:12 wangkailong
  0 siblings, 0 replies; 3+ messages in thread
From: wangkailong @ 2022-11-06 14:12 UTC (permalink / raw)
  To: thierry.reding, jonathanh, sumitg; +Cc: linux-tegra, linux-kernel

Eliminate the follow coccicheck warning:

./drivers/soc/tegra/cbb/tegra-cbb.c:142:3-10: line 142 is redundant
because platform_get_irq() already prints an error
./drivers/soc/tegra/cbb/tegra-cbb.c:152:2-9: line 152 is redundant
because platform_get_irq() already prints an error

Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
 drivers/soc/tegra/cbb/tegra-cbb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/soc/tegra/cbb/tegra-cbb.c b/drivers/soc/tegra/cbb/tegra-cbb.c
index d200937353c7..33e261301132 100644
--- a/drivers/soc/tegra/cbb/tegra-cbb.c
+++ b/drivers/soc/tegra/cbb/tegra-cbb.c
@@ -139,7 +139,6 @@ int tegra_cbb_get_irq(struct platform_device *pdev, unsigned int *nonsec_irq,
 	if (num_intr == 2) {
 		irq = platform_get_irq(pdev, index);
 		if (irq <= 0) {
-			dev_err(&pdev->dev, "failed to get non-secure IRQ: %d\n", irq);
 			return -ENOENT;
 		}
 
@@ -149,7 +148,6 @@ int tegra_cbb_get_irq(struct platform_device *pdev, unsigned int *nonsec_irq,
 
 	irq = platform_get_irq(pdev, index);
 	if (irq <= 0) {
-		dev_err(&pdev->dev, "failed to get secure IRQ: %d\n", irq);
 		return -ENOENT;
 	}
 
-- 
2.25.1

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

* Re: [PATCH] soc/tegra: cbb: Remove unnecessary print function dev_err()
  2023-05-06  9:07 Jiapeng Chong
@ 2023-07-27 16:47 ` Thierry Reding
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2023-07-27 16:47 UTC (permalink / raw)
  To: jonathanh, Jiapeng Chong; +Cc: linux-tegra, linux-kernel, Abaci Robot

From: Thierry Reding <treding@nvidia.com>


On Sat, 06 May 2023 17:07:35 +0800, Jiapeng Chong wrote:
> The print function dev_err() is redundant because platform_get_irq()
> already prints an error.
> 
> ./drivers/soc/tegra/cbb/tegra-cbb.c:130:3-10: line 130 is redundant because platform_get_irq() already prints an error.
> ./drivers/soc/tegra/cbb/tegra-cbb.c:140:2-9: line 140 is redundant because platform_get_irq() already prints an error.
> 
> 
> [...]

Applied, thanks!

[1/1] soc/tegra: cbb: Remove unnecessary print function dev_err()
      commit: 10f975f8b0e8e563bf1e5c2f5e4ebada29fa7edc

Best regards,
-- 
Thierry Reding <treding@nvidia.com>

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

* [PATCH] soc/tegra: cbb: Remove unnecessary print function dev_err()
@ 2023-05-06  9:07 Jiapeng Chong
  2023-07-27 16:47 ` Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Jiapeng Chong @ 2023-05-06  9:07 UTC (permalink / raw)
  To: jonathanh; +Cc: linux-tegra, linux-kernel, Jiapeng Chong, Abaci Robot

The print function dev_err() is redundant because platform_get_irq()
already prints an error.

./drivers/soc/tegra/cbb/tegra-cbb.c:130:3-10: line 130 is redundant because platform_get_irq() already prints an error.
./drivers/soc/tegra/cbb/tegra-cbb.c:140:2-9: line 140 is redundant because platform_get_irq() already prints an error.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4879
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/soc/tegra/cbb/tegra-cbb.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/tegra/cbb/tegra-cbb.c b/drivers/soc/tegra/cbb/tegra-cbb.c
index bd96204a68ee..413b441c1604 100644
--- a/drivers/soc/tegra/cbb/tegra-cbb.c
+++ b/drivers/soc/tegra/cbb/tegra-cbb.c
@@ -126,20 +126,16 @@ int tegra_cbb_get_irq(struct platform_device *pdev, unsigned int *nonsec_irq,
 
 	if (num_intr == 2) {
 		irq = platform_get_irq(pdev, index);
-		if (irq <= 0) {
-			dev_err(&pdev->dev, "failed to get non-secure IRQ: %d\n", irq);
+		if (irq <= 0)
 			return -ENOENT;
-		}
 
 		*nonsec_irq = irq;
 		index++;
 	}
 
 	irq = platform_get_irq(pdev, index);
-	if (irq <= 0) {
-		dev_err(&pdev->dev, "failed to get secure IRQ: %d\n", irq);
+	if (irq <= 0)
 		return -ENOENT;
-	}
 
 	*sec_irq = irq;
 
-- 
2.20.1.7.g153144c


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

end of thread, other threads:[~2023-07-27 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-06 14:12 [PATCH] soc/tegra: cbb: Remove unnecessary print function dev_err() wangkailong
2023-05-06  9:07 Jiapeng Chong
2023-07-27 16:47 ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.