* [PATCH -next] iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure
@ 2019-10-23 13:59 YueHaibing
2019-10-23 14:36 ` Geert Uytterhoeven
2019-10-30 9:17 ` Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-10-23 13:59 UTC (permalink / raw)
To: joro; +Cc: iommu, linux-kernel, swboyd, geert+renesas, jroedel, YueHaibing
platform_get_irq() will call dev_err() itself on failure,
so there is no need for the driver to also do this.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/iommu/ipmmu-vmsa.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index a8b7957..5904c23 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -1110,10 +1110,8 @@ static int ipmmu_probe(struct platform_device *pdev)
/* Root devices have mandatory IRQs */
if (ipmmu_is_root(mmu)) {
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "no IRQ found\n");
+ if (irq < 0)
return irq;
- }
ret = devm_request_irq(&pdev->dev, irq, ipmmu_irq, 0,
dev_name(&pdev->dev), mmu);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure
2019-10-23 13:59 [PATCH -next] iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure YueHaibing
@ 2019-10-23 14:36 ` Geert Uytterhoeven
2019-10-30 9:17 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-10-23 14:36 UTC (permalink / raw)
To: YueHaibing
Cc: Joerg Roedel, Linux IOMMU, Linux Kernel Mailing List,
Stephen Boyd, Geert Uytterhoeven, Joerg Roedel
On Wed, Oct 23, 2019 at 4:01 PM YueHaibing <yuehaibing@huawei.com> wrote:
> platform_get_irq() will call dev_err() itself on failure,
> so there is no need for the driver to also do this.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure
2019-10-23 13:59 [PATCH -next] iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure YueHaibing
2019-10-23 14:36 ` Geert Uytterhoeven
@ 2019-10-30 9:17 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2019-10-30 9:17 UTC (permalink / raw)
To: YueHaibing; +Cc: joro, iommu, linux-kernel, swboyd, geert+renesas
On Wed, Oct 23, 2019 at 09:59:41PM +0800, YueHaibing wrote:
> platform_get_irq() will call dev_err() itself on failure,
> so there is no need for the driver to also do this.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/iommu/ipmmu-vmsa.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied for v5.4, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-30 9:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 13:59 [PATCH -next] iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure YueHaibing
2019-10-23 14:36 ` Geert Uytterhoeven
2019-10-30 9:17 ` Joerg Roedel
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).