[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190730181557.90391-27-swboyd@chromium.org>
Date: Tue, 30 Jul 2019 11:15:26 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: Dmitry Osipenko <digetx@...il.com>,
Thierry Reding <treding@...dia.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joerg Roedel <jroedel@...e.de>,
Markus Mayer <mmayer@...adcom.com>,
Thomas Gleixner <tglx@...utronix.de>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Paul Cercueil <paul@...pouillou.net>
Subject: [PATCH v6 26/57] memory: 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: Dmitry Osipenko <digetx@...il.com>
Cc: Thierry Reding <treding@...dia.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Joerg Roedel <jroedel@...e.de>
Cc: Markus Mayer <mmayer@...adcom.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Paul Cercueil <paul@...pouillou.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@...omium.org>
---
Please apply directly to subsystem trees
drivers/memory/emif.c | 5 +----
drivers/memory/tegra/mc.c | 4 +---
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 402c6bc8e621..f021687ecc5c 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1563,11 +1563,8 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
goto error;
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(emif->dev, "%s: error getting IRQ resource - %d\n",
- __func__, irq);
+ if (irq < 0)
goto error;
- }
emif_onetime_settings(emif);
emif_debugfs_init(emif);
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index 3d8d322511c5..851983c67fc1 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -677,10 +677,8 @@ static int tegra_mc_probe(struct platform_device *pdev)
}
mc->irq = platform_get_irq(pdev, 0);
- if (mc->irq < 0) {
- dev_err(&pdev->dev, "interrupt not specified\n");
+ if (mc->irq < 0)
return mc->irq;
- }
WARN(!mc->soc->client_id_mask, "missing client ID mask for this SoC\n");
--
Sent by a computer through tubes
Powered by blists - more mailing lists