linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq()
@ 2022-11-30  7:56 zhang.songyi
  2022-12-01  6:31 ` Lubomir Rintel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zhang.songyi @ 2022-11-30  7:56 UTC (permalink / raw)
  To: arnd; +Cc: zhang.songyi, robert.jarzmik, lkundrak, linux-kernel

From: zhang songyi <zhang.songyi@zte.com.cn>

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/soc/pxa/ssp.c:150:2-9: line 150 is redundant because
platform_get_irq() already prints an error

Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
 drivers/soc/pxa/ssp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c
index 93449fb3519e..7085901b4e4b 100644
--- a/drivers/soc/pxa/ssp.c
+++ b/drivers/soc/pxa/ssp.c
@@ -147,7 +147,6 @@ static int pxa_ssp_probe(struct platform_device *pdev)

        ssp->irq = platform_get_irq(pdev, 0);
        if (ssp->irq < 0) {
-               dev_err(dev, "no IRQ resource defined\n");
                return -ENODEV;
        }

--
2.15.2

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

* Re: [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq()
  2022-11-30  7:56 [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq() zhang.songyi
@ 2022-12-01  6:31 ` Lubomir Rintel
  2022-12-01 15:31 ` Arnd Bergmann
  2022-12-01 18:15 ` Robert Jarzmik
  2 siblings, 0 replies; 4+ messages in thread
From: Lubomir Rintel @ 2022-12-01  6:31 UTC (permalink / raw)
  To: zhang.songyi; +Cc: arnd, robert.jarzmik, linux-kernel

On Wed, Nov 30, 2022 at 03:56:06PM +0800, zhang.songyi@zte.com.cn wrote:
> From: zhang songyi <zhang.songyi@zte.com.cn>
> 
> 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/soc/pxa/ssp.c:150:2-9: line 150 is redundant because
> platform_get_irq() already prints an error
> 
> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>

Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>

> ---
>  drivers/soc/pxa/ssp.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c
> index 93449fb3519e..7085901b4e4b 100644
> --- a/drivers/soc/pxa/ssp.c
> +++ b/drivers/soc/pxa/ssp.c
> @@ -147,7 +147,6 @@ static int pxa_ssp_probe(struct platform_device *pdev)
> 
>         ssp->irq = platform_get_irq(pdev, 0);
>         if (ssp->irq < 0) {
> -               dev_err(dev, "no IRQ resource defined\n");
>                 return -ENODEV;
>         }
> 
> --
> 2.15.2

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

* Re: [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq()
  2022-11-30  7:56 [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq() zhang.songyi
  2022-12-01  6:31 ` Lubomir Rintel
@ 2022-12-01 15:31 ` Arnd Bergmann
  2022-12-01 18:15 ` Robert Jarzmik
  2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2022-12-01 15:31 UTC (permalink / raw)
  To: zhang.songyi; +Cc: Robert Jarzmik, Lubomir Rintel, linux-kernel

On Wed, Nov 30, 2022, at 08:56, zhang.songyi@zte.com.cn wrote:
> From: zhang songyi <zhang.songyi@zte.com.cn>
>
> 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/soc/pxa/ssp.c:150:2-9: line 150 is redundant because
> platform_get_irq() already prints an error
>
> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
> ---
>  drivers/soc/pxa/ssp.c | 1 -
>  1 file changed, 1 deletion(-)

I tried to apply the patch, but it appears to be whitespace damaged
and does not apply, probably something wrong with your email client.

Can you make sure you are following the steps in 
Documentation/translations/zh_CN/process/email-clients.rst and
resend the patch, with Lubomir's Reviewed-by added in?

Usually the process it for platform maintainers to pick up patches,
but this time please send it directly to soc@kernel.org (since
there is already maintainer ack) and I'll pick it up from there.

Thanks,

       Arnd

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

* Re: [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq()
  2022-11-30  7:56 [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq() zhang.songyi
  2022-12-01  6:31 ` Lubomir Rintel
  2022-12-01 15:31 ` Arnd Bergmann
@ 2022-12-01 18:15 ` Robert Jarzmik
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Jarzmik @ 2022-12-01 18:15 UTC (permalink / raw)
  To: zhang.songyi; +Cc: arnd, robert.jarzmik, lkundrak, linux-kernel


<zhang.songyi@zte.com.cn> writes:

> From: zhang songyi <zhang.songyi@zte.com.cn>
>
> 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/soc/pxa/ssp.c:150:2-9: line 150 is redundant because
> platform_get_irq() already prints an error
>
> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
> ---
>  drivers/soc/pxa/ssp.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c
> index 93449fb3519e..7085901b4e4b 100644
> --- a/drivers/soc/pxa/ssp.c
> +++ b/drivers/soc/pxa/ssp.c
> @@ -147,7 +147,6 @@ static int pxa_ssp_probe(struct 
> platform_device *pdev)
>
>         ssp->irq = platform_get_irq(pdev, 0);
>         if (ssp->irq < 0) {
> -               dev_err(dev, "no IRQ resource defined\n");
>                 return -ENODEV;
>         }
As you're leaving only one statement in the if, you should drop 
the braces as well.

Other than that, it looks good :
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

--
Robert

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

end of thread, other threads:[~2022-12-01 18:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30  7:56 [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq() zhang.songyi
2022-12-01  6:31 ` Lubomir Rintel
2022-12-01 15:31 ` Arnd Bergmann
2022-12-01 18:15 ` Robert Jarzmik

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