2024-06-04 07:52:57

by Johan Hovold

[permalink] [raw]
Subject: [PATCH v2 1/4] soundwire: bus: suppress probe deferral errors

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 <[email protected]>
---
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;
}
--
2.44.1



2024-06-04 09:22:48

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] soundwire: bus: suppress probe deferral errors

On Tue, Jun 04, 2024 at 10:30:21AM +0200, Pierre-Louis Bossart wrote:
> On 6/4/24 02:52, 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:
>
> It's only redundant in the QCOM case... This would remove all error logs
> for other codecs, e.g. see
>
> rt711_sdca_sdw_probe
> cs35l56_sdw_probe
> wcd9390_probe
>
> Looks like the wsa884x-codec is the chatty driver, others are just fine
> with the existing code.

I believe you misunderstood this patch. The error messages above are not
printed by the wsa884x-codec driver, but by the soundwire bus code and
driver core, so the redundant error message will be printed for all
codecs on probe failures.

And specifically, driver core will still log probe failures after this
change.

Johan

2024-06-04 09:41:49

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] soundwire: bus: suppress probe deferral errors



On 6/4/24 02:52, 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:

It's only redundant in the QCOM case... This would remove all error logs
for other codecs, e.g. see

rt711_sdca_sdw_probe
cs35l56_sdw_probe
wcd9390_probe

Looks like the wsa884x-codec is the chatty driver, others are just fine
with the existing code.

2024-06-04 15:12:33

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] soundwire: bus: suppress probe deferral errors



On 6/4/24 11:09, Johan Hovold wrote:
> On Tue, Jun 04, 2024 at 10:30:21AM +0200, Pierre-Louis Bossart wrote:
>> On 6/4/24 02:52, 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:
>>
>> It's only redundant in the QCOM case... This would remove all error logs
>> for other codecs, e.g. see
>>
>> rt711_sdca_sdw_probe
>> cs35l56_sdw_probe
>> wcd9390_probe
>>
>> Looks like the wsa884x-codec is the chatty driver, others are just fine
>> with the existing code.
>
> I believe you misunderstood this patch. The error messages above are not
> printed by the wsa884x-codec driver, but by the soundwire bus code and
> driver core, so the redundant error message will be printed for all
> codecs on probe failures.
>
> And specifically, driver core will still log probe failures after this
> change.

Ah yes, you're right I read 'driver core' sideways, my bad. That's fine
then.