public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soundwire: bus: suppress probe deferral errors
@ 2024-06-03 12:31 Johan Hovold
  2024-06-04  7:55 ` Johan Hovold
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2024-06-03 12:31 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Bard Liao, Pierre-Louis Bossart, Sanyog Kale, alsa-devel,
	linux-kernel, Johan Hovold

Use dev_err_probe() to avoid logging errors on probe deferral:

	wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/soundwire/bus_type.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c
index c32faace618f..8c3746f0d527 100644
--- a/drivers/soundwire/bus_type.c
+++ b/drivers/soundwire/bus_type.c
@@ -112,9 +112,9 @@ static int sdw_drv_probe(struct device *dev)
 		if (!name)
 			name = drv->driver.name;
 
-		dev_err(dev, "Probe of %s failed: %d\n", name, ret);
 		dev_pm_domain_detach(dev, false);
-		return ret;
+
+		return dev_err_probe(dev, ret, "Probe of %s failed\n", name);
 	}
 
 	mutex_lock(&slave->sdw_dev_lock);
-- 
2.44.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] soundwire: bus: suppress probe deferral errors
  2024-06-03 12:31 [PATCH] soundwire: bus: suppress probe deferral errors Johan Hovold
@ 2024-06-04  7:55 ` Johan Hovold
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2024-06-04  7:55 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Vinod Koul, Bard Liao, Pierre-Louis Bossart, Sanyog Kale,
	alsa-devel, linux-kernel

On Mon, Jun 03, 2024 at 02:31:27PM +0200, Johan Hovold wrote:
> Use dev_err_probe() to avoid logging errors on probe deferral:
> 
> 	wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517

The error message here should just be removed as it is already logged by
driver core and does not provide any additional information.

I've sent a v2 here:

	https://lore.kernel.org/lkml/20240604075213.20815-1-johan+linaro@kernel.org/

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-04  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-03 12:31 [PATCH] soundwire: bus: suppress probe deferral errors Johan Hovold
2024-06-04  7:55 ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox