Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Bjorn Andersson <andersson@kernel.org>,
	 Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-msm@vger.kernel.org,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH 07/10] remoteproc: qcom_q6v5_mss: Drop redundant error printks in probe
Date: Fri, 11 Oct 2024 15:09:15 +0200	[thread overview]
Message-ID: <20241011-remote-proc-dev-err-probe-v1-7-5abb4fc61eca@linaro.org> (raw)
In-Reply-To: <20241011-remote-proc-dev-err-probe-v1-0-5abb4fc61eca@linaro.org>

Do not print errors of getting clocks and regulators in probe twice:
once in q6v5_init_clocks() or q6v5_regulator_init() and then again in the
probe function.  This also avoids dmesg flood on deferred probe.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/remoteproc/qcom_q6v5_mss.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 92212892a53ea4843da62642c39413c33b4c962a..68b8172b023ee62be764ba69e07f3743ce6124e3 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -2020,42 +2020,32 @@ static int q6v5_probe(struct platform_device *pdev)
 
 	ret = q6v5_init_clocks(&pdev->dev, qproc->proxy_clks,
 			       desc->proxy_clk_names);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Failed to get proxy clocks.\n");
+	if (ret < 0)
 		return ret;
-	}
 	qproc->proxy_clk_count = ret;
 
 	ret = q6v5_init_clocks(&pdev->dev, qproc->reset_clks,
 			       desc->reset_clk_names);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Failed to get reset clocks.\n");
+	if (ret < 0)
 		return ret;
-	}
 	qproc->reset_clk_count = ret;
 
 	ret = q6v5_init_clocks(&pdev->dev, qproc->active_clks,
 			       desc->active_clk_names);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Failed to get active clocks.\n");
+	if (ret < 0)
 		return ret;
-	}
 	qproc->active_clk_count = ret;
 
 	ret = q6v5_regulator_init(&pdev->dev, qproc->proxy_regs,
 				  desc->proxy_supply);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Failed to get proxy regulators.\n");
+	if (ret < 0)
 		return ret;
-	}
 	qproc->proxy_reg_count = ret;
 
 	ret = q6v5_regulator_init(&pdev->dev,  qproc->active_regs,
 				  desc->active_supply);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Failed to get active regulators.\n");
+	if (ret < 0)
 		return ret;
-	}
 	qproc->active_reg_count = ret;
 
 	ret = q6v5_pds_attach(&pdev->dev, qproc->proxy_pds,
@@ -2065,10 +2055,8 @@ static int q6v5_probe(struct platform_device *pdev)
 		ret = q6v5_regulator_init(&pdev->dev,
 					  qproc->fallback_proxy_regs,
 					  desc->fallback_proxy_supply);
-		if (ret < 0) {
-			dev_err(&pdev->dev, "Failed to get fallback proxy regulators.\n");
+		if (ret < 0)
 			return ret;
-		}
 		qproc->fallback_proxy_reg_count = ret;
 	} else if (ret < 0) {
 		dev_err(&pdev->dev, "Failed to init power domains\n");

-- 
2.43.0


  parent reply	other threads:[~2024-10-11 13:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 13:09 [PATCH 00/10] remoteproc: few dev_err_probe() and other cleanups/improvements Krzysztof Kozlowski
2024-10-11 13:09 ` [PATCH 01/10] remoteproc: da8xx: Handle deferred probe Krzysztof Kozlowski
2024-10-11 13:09 ` [PATCH 02/10] remoteproc: da8xx: Simplify with dev_err_probe() Krzysztof Kozlowski
2024-10-11 13:09 ` [PATCH 03/10] remoteproc: ti_k3_r5: " Krzysztof Kozlowski
2024-10-11 13:09 ` [PATCH 04/10] remoteproc: ti_k3_r5: Simplify with scoped for each OF child loop Krzysztof Kozlowski
2024-10-11 13:09 ` [PATCH 05/10] remoteproc: qcom_q6v5_adsp: Simplify with dev_err_probe() Krzysztof Kozlowski
2024-10-11 13:31   ` Dmitry Baryshkov
2024-10-11 13:09 ` [PATCH 06/10] remoteproc: qcom_q6v5_mss: " Krzysztof Kozlowski
2024-10-11 13:35   ` Dmitry Baryshkov
2024-10-11 13:09 ` Krzysztof Kozlowski [this message]
2024-10-11 13:35   ` [PATCH 07/10] remoteproc: qcom_q6v5_mss: Drop redundant error printks in probe Dmitry Baryshkov
2024-10-11 13:09 ` [PATCH 08/10] remoteproc: qcom_q6v5_pas: Simplify with dev_err_probe() Krzysztof Kozlowski
2024-10-11 13:35   ` Dmitry Baryshkov
2024-10-11 13:09 ` [PATCH 09/10] remoteproc: qcom_q6v5_wcss: " Krzysztof Kozlowski
2024-10-11 13:36   ` Dmitry Baryshkov
2024-10-11 13:09 ` [PATCH 10/10] remoteproc: qcom_wcnss_iris: " Krzysztof Kozlowski
2024-10-11 13:36   ` Dmitry Baryshkov
2024-10-15 17:45 ` [PATCH 00/10] remoteproc: few dev_err_probe() and other cleanups/improvements Mathieu Poirier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241011-remote-proc-dev-err-probe-v1-7-5abb4fc61eca@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=andersson@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox