linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] staging: media: Remove surplus dev_err() when using platform_get_irq()
@ 2022-11-29  1:29 Yang Li
  2022-12-05 20:52 ` Jernej Škrabec
  2022-12-08 13:23 ` Paul Kocialkowski
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2022-11-29  1:29 UTC (permalink / raw)
  To: paul.kocialkowski
  Cc: mchehab, wens, jernej.skrabec, samuel, linux-media, linux-staging,
	linux-arm-kernel, linux-sunxi, linux-kernel, Yang Li, Abaci Robot

There is no need to call the dev_err() function directly to print a
custom message when handling an error from either the platform_get_irq()
or platform_get_irq_byname() functions as both are going to display an
appropriate error message in case of a failure.

./drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c:390:2-9: line 390 is redundant because platform_get_irq() already prints an error

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3274
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
index 7b7947509b69..a6e813ff413a 100644
--- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
+++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
@@ -387,7 +387,6 @@ static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev,
 
 	irq = platform_get_irq(platform_dev, 0);
 	if (irq < 0) {
-		dev_err(dev, "failed to get interrupt\n");
 		ret = -ENXIO;
 		goto error_clock_rate_exclusive;
 	}
-- 
2.20.1.7.g153144c


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] staging: media: Remove surplus dev_err() when using platform_get_irq()
  2022-11-29  1:29 [PATCH -next] staging: media: Remove surplus dev_err() when using platform_get_irq() Yang Li
@ 2022-12-05 20:52 ` Jernej Škrabec
  2022-12-08 13:23 ` Paul Kocialkowski
  1 sibling, 0 replies; 3+ messages in thread
From: Jernej Škrabec @ 2022-12-05 20:52 UTC (permalink / raw)
  To: paul.kocialkowski, Yang Li
  Cc: mchehab, wens, samuel, linux-media, linux-staging,
	linux-arm-kernel, linux-sunxi, linux-kernel, Yang Li, Abaci Robot

Dne torek, 29. november 2022 ob 02:29:23 CET je Yang Li napisal(a):
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from either the platform_get_irq()
> or platform_get_irq_byname() functions as both are going to display an
> appropriate error message in case of a failure.
> 
> ./drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c:390:2-9: line 390 is
> redundant because platform_get_irq() already prints an error
> 
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3274
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] staging: media: Remove surplus dev_err() when using platform_get_irq()
  2022-11-29  1:29 [PATCH -next] staging: media: Remove surplus dev_err() when using platform_get_irq() Yang Li
  2022-12-05 20:52 ` Jernej Škrabec
@ 2022-12-08 13:23 ` Paul Kocialkowski
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Kocialkowski @ 2022-12-08 13:23 UTC (permalink / raw)
  To: Yang Li
  Cc: mchehab, wens, jernej.skrabec, samuel, linux-media, linux-staging,
	linux-arm-kernel, linux-sunxi, linux-kernel, Abaci Robot


[-- Attachment #1.1: Type: text/plain, Size: 1522 bytes --]

Hi,

On Tue 29 Nov 22, 09:29, Yang Li wrote:
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from either the platform_get_irq()
> or platform_get_irq_byname() functions as both are going to display an
> appropriate error message in case of a failure.
> 
> ./drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c:390:2-9: line 390 is redundant because platform_get_irq() already prints an error
> 
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3274
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Thanks for the fix!

Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Paul

> ---
>  drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
> index 7b7947509b69..a6e813ff413a 100644
> --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
> +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
> @@ -387,7 +387,6 @@ static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev,
>  
>  	irq = platform_get_irq(platform_dev, 0);
>  	if (irq < 0) {
> -		dev_err(dev, "failed to get interrupt\n");
>  		ret = -ENXIO;
>  		goto error_clock_rate_exclusive;
>  	}
> -- 
> 2.20.1.7.g153144c
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-12-08 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29  1:29 [PATCH -next] staging: media: Remove surplus dev_err() when using platform_get_irq() Yang Li
2022-12-05 20:52 ` Jernej Škrabec
2022-12-08 13:23 ` Paul Kocialkowski

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).