Commit 031bca07 authored by Stephen Boyd's avatar Stephen Boyd Committed by Li Yang
Browse files

soc: fsl: qbman: Remove dev_err() usage after platform_get_irq()



We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

Cc: Thierry Reding <treding@nvidia.com>
Cc: Li Yang <leoyang.li@nxp.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent 157eed91
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -135,10 +135,8 @@ static int bman_portal_probe(struct platform_device *pdev)
	pcfg->cpu = -1;

	irq = platform_get_irq(pdev, 0);
	if (irq <= 0) {
		dev_err(dev, "Can't get %pOF IRQ'\n", node);
	if (irq <= 0)
		goto err_ioremap1;
	}
	pcfg->irq = irq;

	pcfg->addr_virt_ce = memremap(addr_phys[0]->start,
+1 −3
Original line number Diff line number Diff line
@@ -275,10 +275,8 @@ static int qman_portal_probe(struct platform_device *pdev)
	pcfg->channel = val;
	pcfg->cpu = -1;
	irq = platform_get_irq(pdev, 0);
	if (irq <= 0) {
		dev_err(dev, "Can't get %pOF IRQ\n", node);
	if (irq <= 0)
		goto err_ioremap1;
	}
	pcfg->irq = irq;

	pcfg->addr_virt_ce = memremap(addr_phys[0]->start,