linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] clocksource/drivers/sun5i: Remove redundant dev_err() for platform_get_irq()
@ 2023-09-01  7:13 Jinjie Ruan
  2023-09-05 20:33 ` Jernej Škrabec
  0 siblings, 1 reply; 2+ messages in thread
From: Jinjie Ruan @ 2023-09-01  7:13 UTC (permalink / raw)
  To: linux-arm-kernel, linux-sunxi, Daniel Lezcano, Thomas Gleixner,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Mans Rullgard,
	Maxime Ripard
  Cc: ruanjinjie

Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
to platform_get_irq*()") and commit 2043727c2882 ("driver core:
platform: Make use of the helper function dev_err_probe()"), there is
no need to call the dev_err() function directly to print a custom
message when handling an error from platform_get_irq() function as it is
going to display an appropriate error message in case of a failure.

Fixes: 7e5bac610d2f ("clocksource/drivers/sun5i: Convert to platform device driver")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/clocksource/timer-sun5i.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
index 69fee3540d37..0d229a9058da 100644
--- a/drivers/clocksource/timer-sun5i.c
+++ b/drivers/clocksource/timer-sun5i.c
@@ -256,10 +256,8 @@ static int sun5i_timer_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "Can't get IRQ\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	clk = devm_clk_get_enabled(dev, NULL);
 	if (IS_ERR(clk)) {
-- 
2.34.1


_______________________________________________
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] 2+ messages in thread

* Re: [PATCH -next] clocksource/drivers/sun5i: Remove redundant dev_err() for platform_get_irq()
  2023-09-01  7:13 [PATCH -next] clocksource/drivers/sun5i: Remove redundant dev_err() for platform_get_irq() Jinjie Ruan
@ 2023-09-05 20:33 ` Jernej Škrabec
  0 siblings, 0 replies; 2+ messages in thread
From: Jernej Škrabec @ 2023-09-05 20:33 UTC (permalink / raw)
  To: linux-arm-kernel, linux-sunxi, Daniel Lezcano, Thomas Gleixner,
	Chen-Yu Tsai, Samuel Holland, Mans Rullgard, Maxime Ripard,
	Jinjie Ruan
  Cc: ruanjinjie

On Friday, September 1, 2023 9:13:28 AM CEST Jinjie Ruan wrote:
> Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
> to platform_get_irq*()") and commit 2043727c2882 ("driver core:
> platform: Make use of the helper function dev_err_probe()"), there is
> no need to call the dev_err() function directly to print a custom
> message when handling an error from platform_get_irq() function as it is
> going to display an appropriate error message in case of a failure.
> 
> Fixes: 7e5bac610d2f ("clocksource/drivers/sun5i: Convert to platform device
> driver") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>

This was already submitted one day earlier:
https://lore.kernel.org/all/20230831041414.66434-1-yang.lee@linux.alibaba.com/

Best regards,
Jernej

> ---
>  drivers/clocksource/timer-sun5i.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-sun5i.c
> b/drivers/clocksource/timer-sun5i.c index 69fee3540d37..0d229a9058da 100644
> --- a/drivers/clocksource/timer-sun5i.c
> +++ b/drivers/clocksource/timer-sun5i.c
> @@ -256,10 +256,8 @@ static int sun5i_timer_probe(struct platform_device
> *pdev) }
> 
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0) {
> -		dev_err(dev, "Can't get IRQ\n");
> +	if (irq < 0)
>  		return irq;
> -	}
> 
>  	clk = devm_clk_get_enabled(dev, NULL);
>  	if (IS_ERR(clk)) {





_______________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2023-09-05 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01  7:13 [PATCH -next] clocksource/drivers/sun5i: Remove redundant dev_err() for platform_get_irq() Jinjie Ruan
2023-09-05 20:33 ` Jernej Škrabec

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