All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mårten Lindahl" <marten.lindahl@axis.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@axis.com,
	"Mårten Lindahl" <marten.lindahl@axis.com>
Subject: [PATCH v2] spi: spl022: Probe defer is no error
Date: Fri, 2 Jun 2023 20:12:54 +0200	[thread overview]
Message-ID: <20230602-pl022-defer-fix-v2-1-383f6bc2293a@axis.com> (raw)

When the spi controller is registered and the cs_gpiods cannot be
assigned, causing a defer of the probe, there is an error print saying:
"probe - problem registering spi master"

This should not be announced as an error. Print this message for all
errors except for the probe defer.

Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
---
Changes in v2:
- Use dev_err_probe instead of standalone check with print.
- Link to v1: https://lore.kernel.org/r/20230602-pl022-defer-fix-v1-1-b80bfca3e1b4@axis.com
---
 drivers/spi/spi-pl022.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 982407bc5d9f..1af75eff26b6 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2217,8 +2217,8 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
 	amba_set_drvdata(adev, pl022);
 	status = devm_spi_register_master(&adev->dev, master);
 	if (status != 0) {
-		dev_err(&adev->dev,
-			"probe - problem registering spi master\n");
+		dev_err_probe(&adev->dev, status,
+			      "problem registering spi master\n");
 		goto err_spi_register;
 	}
 	dev_dbg(dev, "probe succeeded\n");

---
base-commit: 7877cb91f1081754a1487c144d85dc0d2e2e7fc4
change-id: 20230602-pl022-defer-fix-0f8b8c0b6eff

Best regards,
-- 
Mårten Lindahl <marten.lindahl@axis.com>


WARNING: multiple messages have this Message-ID (diff)
From: "Mårten Lindahl" <marten.lindahl@axis.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@axis.com,
	"Mårten Lindahl" <marten.lindahl@axis.com>
Subject: [PATCH v2] spi: spl022: Probe defer is no error
Date: Fri, 2 Jun 2023 20:12:54 +0200	[thread overview]
Message-ID: <20230602-pl022-defer-fix-v2-1-383f6bc2293a@axis.com> (raw)

When the spi controller is registered and the cs_gpiods cannot be
assigned, causing a defer of the probe, there is an error print saying:
"probe - problem registering spi master"

This should not be announced as an error. Print this message for all
errors except for the probe defer.

Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
---
Changes in v2:
- Use dev_err_probe instead of standalone check with print.
- Link to v1: https://lore.kernel.org/r/20230602-pl022-defer-fix-v1-1-b80bfca3e1b4@axis.com
---
 drivers/spi/spi-pl022.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 982407bc5d9f..1af75eff26b6 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2217,8 +2217,8 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
 	amba_set_drvdata(adev, pl022);
 	status = devm_spi_register_master(&adev->dev, master);
 	if (status != 0) {
-		dev_err(&adev->dev,
-			"probe - problem registering spi master\n");
+		dev_err_probe(&adev->dev, status,
+			      "problem registering spi master\n");
 		goto err_spi_register;
 	}
 	dev_dbg(dev, "probe succeeded\n");

---
base-commit: 7877cb91f1081754a1487c144d85dc0d2e2e7fc4
change-id: 20230602-pl022-defer-fix-0f8b8c0b6eff

Best regards,
-- 
Mårten Lindahl <marten.lindahl@axis.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2023-06-02 18:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 18:12 Mårten Lindahl [this message]
2023-06-02 18:12 ` [PATCH v2] spi: spl022: Probe defer is no error Mårten Lindahl
2023-06-02 20:02 ` Linus Walleij
2023-06-02 20:02   ` Linus Walleij
2023-06-05 14:55 ` Mark Brown
2023-06-05 14:55   ` Mark Brown

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=20230602-pl022-defer-fix-v2-1-383f6bc2293a@axis.com \
    --to=marten.lindahl@axis.com \
    --cc=broonie@kernel.org \
    --cc=kernel@axis.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.