From: Robert Jarzmik <robert.jarzmik@free.fr>
To: zhang.songyi@zte.com.cn
Cc: arnd@arndb.de, robert.jarzmik@free.fr, lkundrak@v3.sk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq()
Date: Thu, 01 Dec 2022 19:15:34 +0100 [thread overview]
Message-ID: <m25yevf0ph.fsf@free.fr> (raw)
In-Reply-To: <202211301556064978448@zte.com.cn>
<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
prev parent reply other threads:[~2022-12-01 18:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m25yevf0ph.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lkundrak@v3.sk \
--cc=zhang.songyi@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.