[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190730181557.90391-39-swboyd@chromium.org>
Date: Tue, 30 Jul 2019 11:15:38 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: Ohad Ben-Cohen <ohad@...ery.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
linux-remoteproc@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH v6 38/57] remoteproc: 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: Ohad Ben-Cohen <ohad@...ery.com>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: linux-remoteproc@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@...omium.org>
---
Please apply directly to subsystem trees
drivers/remoteproc/da8xx_remoteproc.c | 4 +--
drivers/remoteproc/keystone_remoteproc.c | 4 ---
drivers/remoteproc/qcom_q6v5.c | 35 ++++--------------------
3 files changed, 6 insertions(+), 37 deletions(-)
diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c
index b2c7af323ed1..98e0be9476a4 100644
--- a/drivers/remoteproc/da8xx_remoteproc.c
+++ b/drivers/remoteproc/da8xx_remoteproc.c
@@ -249,10 +249,8 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
int ret;
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(dev, "platform_get_irq(pdev, 0) error: %d\n", irq);
+ if (irq < 0)
return irq;
- }
irq_data = irq_get_irq_data(irq);
if (!irq_data) {
diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c
index 4cb44017af8a..5c4658f00b3d 100644
--- a/drivers/remoteproc/keystone_remoteproc.c
+++ b/drivers/remoteproc/keystone_remoteproc.c
@@ -424,16 +424,12 @@ static int keystone_rproc_probe(struct platform_device *pdev)
ksproc->irq_ring = platform_get_irq_byname(pdev, "vring");
if (ksproc->irq_ring < 0) {
ret = ksproc->irq_ring;
- dev_err(dev, "failed to get vring interrupt, status = %d\n",
- ret);
goto disable_clk;
}
ksproc->irq_fault = platform_get_irq_byname(pdev, "exception");
if (ksproc->irq_fault < 0) {
ret = ksproc->irq_fault;
- dev_err(dev, "failed to get exception interrupt, status = %d\n",
- ret);
goto disable_clk;
}
diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c
index 0d33e3079f0d..cb0f4a0be032 100644
--- a/drivers/remoteproc/qcom_q6v5.c
+++ b/drivers/remoteproc/qcom_q6v5.c
@@ -187,13 +187,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
init_completion(&q6v5->stop_done);
q6v5->wdog_irq = platform_get_irq_byname(pdev, "wdog");
- if (q6v5->wdog_irq < 0) {
- if (q6v5->wdog_irq != -EPROBE_DEFER)
- dev_err(&pdev->dev,
- "failed to retrieve wdog IRQ: %d\n",
- q6v5->wdog_irq);
+ if (q6v5->wdog_irq < 0)
return q6v5->wdog_irq;
- }
ret = devm_request_threaded_irq(&pdev->dev, q6v5->wdog_irq,
NULL, q6v5_wdog_interrupt,
@@ -205,13 +200,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
}
q6v5->fatal_irq = platform_get_irq_byname(pdev, "fatal");
- if (q6v5->fatal_irq < 0) {
- if (q6v5->fatal_irq != -EPROBE_DEFER)
- dev_err(&pdev->dev,
- "failed to retrieve fatal IRQ: %d\n",
- q6v5->fatal_irq);
+ if (q6v5->fatal_irq < 0)
return q6v5->fatal_irq;
- }
ret = devm_request_threaded_irq(&pdev->dev, q6v5->fatal_irq,
NULL, q6v5_fatal_interrupt,
@@ -223,13 +213,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
}
q6v5->ready_irq = platform_get_irq_byname(pdev, "ready");
- if (q6v5->ready_irq < 0) {
- if (q6v5->ready_irq != -EPROBE_DEFER)
- dev_err(&pdev->dev,
- "failed to retrieve ready IRQ: %d\n",
- q6v5->ready_irq);
+ if (q6v5->ready_irq < 0)
return q6v5->ready_irq;
- }
ret = devm_request_threaded_irq(&pdev->dev, q6v5->ready_irq,
NULL, q6v5_ready_interrupt,
@@ -241,13 +226,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
}
q6v5->handover_irq = platform_get_irq_byname(pdev, "handover");
- if (q6v5->handover_irq < 0) {
- if (q6v5->handover_irq != -EPROBE_DEFER)
- dev_err(&pdev->dev,
- "failed to retrieve handover IRQ: %d\n",
- q6v5->handover_irq);
+ if (q6v5->handover_irq < 0)
return q6v5->handover_irq;
- }
ret = devm_request_threaded_irq(&pdev->dev, q6v5->handover_irq,
NULL, q6v5_handover_interrupt,
@@ -260,13 +240,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
disable_irq(q6v5->handover_irq);
q6v5->stop_irq = platform_get_irq_byname(pdev, "stop-ack");
- if (q6v5->stop_irq < 0) {
- if (q6v5->stop_irq != -EPROBE_DEFER)
- dev_err(&pdev->dev,
- "failed to retrieve stop-ack IRQ: %d\n",
- q6v5->stop_irq);
+ if (q6v5->stop_irq < 0)
return q6v5->stop_irq;
- }
ret = devm_request_threaded_irq(&pdev->dev, q6v5->stop_irq,
NULL, q6v5_stop_interrupt,
--
Sent by a computer through tubes
Powered by blists - more mailing lists