Skip to contentSkip to conversation

pxa: Remove dev_err() after platform_get_irq()

PATCH Superseded [email protected] 4 participants 4 messages Nov 30, 2022 – Dec 1, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pxa: Remove dev_err() after platform_get_irq()

From: zhang songyi <[email protected]>

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

---
 drivers/soc/pxa/ssp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/soc/pxa/ssp.c +0 -1
index 93449fb3519e..7085901b4e4b 100644
@@ -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

Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · On Wed, Nov 30, 2022 at 03:56:06PM +0800, [email protected] wrote:

From: zhang songyi <[email protected]>

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

Quoted 18 lines
---
 drivers/soc/pxa/ssp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/soc/pxa/ssp.c +0 -2
index 93449fb3519e..7085901b4e4b 100644
@@ -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

#2 lore raw
In reply to [email protected]
Quoted 7 lines · On Wed, Nov 30, 2022, at 08:56, [email protected] wrote:

From: zhang songyi <[email protected]>

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.

Quoted 7 lines

/drivers/soc/pxa/ssp.c:150:2-9: line 150 is redundant because platform_get_irq() already prints an error

---
 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 [email protected] (since there is already maintainer ack) and I'll pick it up from there.

Thanks,

Arnd

Reviewed-by on v1 1/1
#3 lore raw
In reply to [email protected]
Quoted 20 lines · <[email protected]> writes:

From: zhang songyi <[email protected]>

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

---
 drivers/soc/pxa/ssp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/soc/pxa/ssp.c +0 -0
index 93449fb3519e..7085901b4e4b 100644

drivers/soc/pxa/ssp.c static int pxa_ssp_probe(struct · line 152

Quoted 7 lines
drivers/soc/pxa/ssp.c +0 -1
@@ -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 :

Cheers.

--
Robert