mbox series

[v3,0/3] soundwire: bus: suppress probe deferral errors

Message ID 20240712140801.24267-1-johan+linaro@kernel.org
Headers show
Series soundwire: bus: suppress probe deferral errors | expand

Message

Johan Hovold July 12, 2024, 2:07 p.m. UTC
The soundwire bus code is incorrectly logging probe deferrals as errors.

This series addresses that, cleans up the soundwire bus logging and
drops the unused soudwire driver name field.

Vinod, I booted linux-next yesterday and realised that these bogus error
messages are still spamming the logs when booting x1e80100 and making it
harder to see the valid warnings (which there were too many of). Would
be nice to have this fixed in 6.11:

[   18.815950] wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517
[   18.825093] wsa884x-codec sdw:1:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517
[   18.832335] wsa884x-codec sdw:4:0:0217:0204:00:1: Probe of wsa884x-codec failed: -517
[   18.840870] wsa884x-codec sdw:1:0:0217:0204:00:1: Probe of wsa884x-codec failed: -517
[   18.848463] wsa884x-codec sdw:1:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517

Johan


Changes in v3
 - amend the update status error message with "at probe" to make it more
   descriptive (it's already unique)
 - drop the patch dropping a probe debug message

Changes in v2
 - drop probe error message completely
 - drop soundwire driver name field
 - cleanup probe warning messages
 - drop probe debug message

Johan Hovold (3):
  soundwire: bus: suppress probe deferral errors
  soundwire: bus: drop unused driver name field
  soundwire: bus: clean up probe warnings

 drivers/soundwire/bus_type.c  | 19 ++++---------------
 include/linux/soundwire/sdw.h |  2 --
 2 files changed, 4 insertions(+), 17 deletions(-)

Comments

Pierre-Louis Bossart July 15, 2024, 9:23 a.m. UTC | #1
On 7/12/24 16:07, Johan Hovold wrote:
> Soundwire driver probe errors are currently being logged both by the bus
> code and driver core:
> 
> 	wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -12
> 	wsa884x-codec sdw:4:0:0217:0204:00:0: probe with driver wsa884x-codec failed with error -12
> 
> Drop the redundant bus error message, which is also incorrectly being
> logged on probe deferral:
> 
> 	wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517
> 
> Note that no soundwire driver uses the driver struct name field, which
> will be removed by a follow-on change.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>  drivers/soundwire/bus_type.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c
> index c32faace618f..85fa5970d98a 100644
> --- a/drivers/soundwire/bus_type.c
> +++ b/drivers/soundwire/bus_type.c
> @@ -83,7 +83,6 @@ static int sdw_drv_probe(struct device *dev)
>  	struct sdw_slave *slave = dev_to_sdw_dev(dev);
>  	struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
>  	const struct sdw_device_id *id;
> -	const char *name;
>  	int ret;
>  
>  	/*
> @@ -108,11 +107,6 @@ static int sdw_drv_probe(struct device *dev)
>  
>  	ret = drv->probe(slave, id);
>  	if (ret) {
> -		name = drv->name;
> -		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;
>  	}