soundwire: bus: suppress probe deferral errors
v2 cover soundwire: bus: suppress probe deferral errors
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.
Johan
Changes in v2
- drop probe error message completely
- drop soundwire driver name field
- cleanup probe warning messages
- drop probe debug message
Johan Hovold (4):
soundwire: bus: suppress probe deferral errors
soundwire: bus: drop unused driver name field
soundwire: bus: clean up probe warnings
soundwire: bus: drop redundant probe debug message
drivers/soundwire/bus_type.c | 21 ++++----------------- include/linux/soundwire/sdw.h | 2 -- 2 files changed, 4 insertions(+), 19 deletions(-)
Signature · 1 line
2.44.1
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.
--- drivers/soundwire/bus_type.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/soundwire/bus_type.c +0 -6
@@ -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; }
Signature · 1 line
2.44.1
Quoted 8 lines · Johan Hovold
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 -12Drop 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_probecs35l56_sdw_probewcd9390_probe
Looks like the wsa884x-codec is the chatty driver, others are just fine with the existing code.
Quoted 13 lines · Pierre-Louis Bossart
Quoted 8 lines · Johan Hovold
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 -12Drop 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
Quoted 6 lines
rt711_sdca_sdw_probecs35l56_sdw_probewcd9390_probeLooks 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
Quoted 21 lines · Johan Hovold
Quoted 13 lines · Pierre-Louis Bossart
Quoted 8 lines · Johan Hovold
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 -12Drop 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
Quoted 6 lines
rt711_sdca_sdw_probecs35l56_sdw_probewcd9390_probeLooks like the wsa884x-codec is the chatty driver, others are just fine with the existing code.
Quoted 7 lines
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.
PATCH v2 2/4 soundwire: bus: drop unused driver name field
In reply to Johan HovoldThe soundwire driver name field is not currently used by any driver (and even appears to never have been used) so drop it.
--- drivers/soundwire/bus_type.c | 9 ++------- include/linux/soundwire/sdw.h | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-)
drivers/soundwire/bus_type.c +2 -7
@@ -198,16 +198,11 @@ static void sdw_drv_shutdown(struct device *dev)*/ int __sdw_register_driver (struct sdw_driver *drv,struct module *owner) { -const char *name; - drv->driver.bus = &sdw_bus_type;if (!drv->probe) { - name = drv->name; -if (!name) - name = drv->driver.name; - -pr_err ("driver %s didn't provide SDW probe routine\n" , name); +pr_err ("driver %s didn't provide SDW probe routine\n" , + drv->driver.name);return -EINVAL ; }
include/linux/soundwire/sdw.h +0 -2
@@ -704,8 +704,6 @@ struct sdw_master_device { container_of(d, struct sdw_master_device, dev)struct sdw_driver { -const char *name; -int (*probe)(struct sdw_slave *sdw,const struct sdw_device_id *id);int (*remove)(struct sdw_slave *sdw);
Signature · 1 line
2.44.1
PATCH v2 3/4 soundwire: bus: clean up probe warnings
In reply to Johan HovoldClean up the probe warning messages by using a common succinct format (e.g. without __func__ and with a space after ':').
--- drivers/soundwire/bus_type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soundwire/bus_type.c +2 -2
@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev)/* init the dynamic sysfs attributes we need */ ret =sdw_slave_sysfs_dpn_init (slave);if (ret <0 ) -dev_warn (dev,"Slave sysfs init failed:%d\n" , ret); +dev_warn (dev,"failed to initialise sysfs: %d\n" , ret);/* * Check for valid clk_stop_timeout, use DisCo worst case value of
@@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev)if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status (slave, slave->status);if (ret <0 ) -dev_warn (dev,"%s: update_status failed with status %d\n" , __func__, ret); +dev_warn (dev,"failed to update status: %d\n" , ret); }mutex_unlock (&slave->sdw_dev_lock);
Signature · 1 line
2.44.1
Re: [PATCH v2 3/4] soundwire: bus: clean up probe warnings
Quoted 22 lines · Johan Hovold
Clean up the probe warning messages by using a common succinct format (e.g. without
__func__and with a space after ':').Signed-off-by Johan Hovold <[email protected]>--- drivers/soundwire/bus_type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/soundwire/bus_type.c +1
-1@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev)/* init the dynamic sysfs attributes we need */ ret =sdw_slave_sysfs_dpn_init (slave);if (ret <0 ) -dev_warn (dev,"Slave sysfs init failed:%d\n" , ret); +dev_warn (dev,"failed to initialise sysfs: %d\n" , ret);/* * Check for valid clk_stop_timeout, use DisCo worst case value of
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 150
Quoted 5 lines
drivers/soundwire/bus_type.c +1
-1@@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev)if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status (slave, slave->status);if (ret <0 ) -dev_warn (dev,"%s: update_status failed with status %d\n" , __func__, ret); +dev_warn (dev,"failed to update status: %d\n" , ret);
the __func__ does help IMHO, 'failed to update status' is way too general... Replacing 'with status' by ":" is fine, but do we really care about 10 chars in a log?
Re: [PATCH v2 3/4] soundwire: bus: clean up probe warnings
Quoted 11 lines · Pierre-Louis Bossart
Quoted 10 lines · Johan Hovold
Clean up the probe warning messages by using a common succinct format (e.g. without
__func__and with a space after ':').drivers/soundwire/bus_type.c +1
-1@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev)/* init the dynamic sysfs attributes we need */ ret =sdw_slave_sysfs_dpn_init (slave);if (ret <0 ) -dev_warn (dev,"Slave sysfs init failed:%d\n" , ret); +dev_warn (dev,"failed to initialise sysfs: %d\n" , ret);
Quoted 10 lines
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 150
Quoted 8 lines
drivers/soundwire/bus_type.c +1
-1/* * Check for valid clk_stop_timeout, use DisCo worst case value of @@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev)if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status (slave, slave->status);if (ret <0 ) -dev_warn (dev,"%s: update_status failed with status %d\n" , __func__, ret); +dev_warn (dev,"failed to update status: %d\n" , ret);the
__func__does help IMHO, 'failed to update status' is way too general...
Error messages printed with dev_warn will include the device and driver names so this message will be quite specific still.
Quoted 2 lines
Replacing 'with status' by ":" is fine, but do we really care about 10 chars in a log?
It's not primarily about the numbers of characters but about consistency.
Johan
Re: [PATCH v2 3/4] soundwire: bus: clean up probe warnings
Quoted 23 lines · Johan Hovold
Quoted 11 lines · Pierre-Louis Bossart
Quoted 10 lines · Johan Hovold
Clean up the probe warning messages by using a common succinct format (e.g. without
__func__and with a space after ':').drivers/soundwire/bus_type.c +1
-1@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev)/* init the dynamic sysfs attributes we need */ ret =sdw_slave_sysfs_dpn_init (slave);if (ret <0 ) -dev_warn (dev,"Slave sysfs init failed:%d\n" , ret); +dev_warn (dev,"failed to initialise sysfs: %d\n" , ret);Quoted 10 lines
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 150
Quoted 8 lines
drivers/soundwire/bus_type.c +1
-1/* * Check for valid clk_stop_timeout, use DisCo worst case value of @@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev)if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status (slave, slave->status);if (ret <0 ) -dev_warn (dev,"%s: update_status failed with status %d\n" , __func__, ret); +dev_warn (dev,"failed to update status: %d\n" , ret);the
__func__does help IMHO, 'failed to update status' is way too general...
Quoted 2 lines
Error messages printed with
dev_warnwill include the device and driver names so this message will be quite specific still.
The goal isn't to be 'quite specific' but rather 'completely straightforward'. Everyone can lookup a function name in a xref tool and
quickly find out what happened. Doing 'git grep' on message logs isn't
great really, and over time logs tend to be copy-pasted. Just look at the number of patches where we had to revisit the dev_err logs to make then really unique/useful.
Quoted 4 lines
Quoted 2 lines
Replacing 'with status' by ":" is fine, but do we really care about 10 chars in a log?
It's not primarily about the numbers of characters but about consistency.
I am advocating for inclusion of __func__ everywhere...It's simpler for remote support and bug chasing.
The exception to the rule would be dev_dbg where you can get the function name with module options.
Re: [PATCH v2 3/4] soundwire: bus: clean up probe warnings
Quoted 27 lines · Pierre-Louis Bossart
Quoted 23 lines · Johan Hovold
Quoted 11 lines · Pierre-Louis Bossart
Quoted 10 lines · Johan Hovold
Clean up the probe warning messages by using a common succinct format (e.g. without
__func__and with a space after ':').drivers/soundwire/bus_type.c +1
-1@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev)/* init the dynamic sysfs attributes we need */ ret =sdw_slave_sysfs_dpn_init (slave);if (ret <0 ) -dev_warn (dev,"Slave sysfs init failed:%d\n" , ret); +dev_warn (dev,"failed to initialise sysfs: %d\n" , ret);Quoted 10 lines
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 150
Quoted 8 lines
drivers/soundwire/bus_type.c +1
-1/* * Check for valid clk_stop_timeout, use DisCo worst case value of @@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev)if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status (slave, slave->status);if (ret <0 ) -dev_warn (dev,"%s: update_status failed with status %d\n" , __func__, ret); +dev_warn (dev,"failed to update status: %d\n" , ret);the
__func__does help IMHO, 'failed to update status' is way too general...Quoted 2 lines
Error messages printed with
dev_warnwill include the device and driver names so this message will be quite specific still.
Quoted 6 lines
The goal isn't to be 'quite specific' but rather 'completely straightforward'. Everyone can lookup a function name in a xref tool and
quickly find out what happened. Doing 'git grep' on message logs isn't
great really, and over time logs tend to be copy-pasted. Just look at the number of patches where we had to revisit thedev_errlogs to make then really unique/useful.
Error message should be self-contained and give user's some idea of what went wrong and not leak implementation details like function names (and be greppable, which "%s:" is not).
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Replacing 'with status' by ":" is fine, but do we really care about 10 chars in a log?
It's not primarily about the numbers of characters but about consistency.
I am advocating for inclusion of
__func__everywhere...It's simpler for remote support and bug chasing.
A quick grep seems to suggest you're in a small minority here with some 5k of 65k dev_err() including __func__.
[ And there's only 55 out of 750 dev_err() like that in drivers/soundwire, which is inconsistent at best. ]
Johan
Re: [PATCH v2 3/4] soundwire: bus: clean up probe warnings
\
Quoted 28 lines
Quoted 21 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
drivers/soundwire/bus_type.c +1
-1@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev)/* init the dynamic sysfs attributes we need */ ret =sdw_slave_sysfs_dpn_init (slave);if (ret <0 ) -dev_warn (dev,"Slave sysfs init failed:%d\n" , ret); +dev_warn (dev,"failed to initialise sysfs: %d\n" , ret);Quoted 10 lines
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 150
Quoted 8 lines
drivers/soundwire/bus_type.c +1
-1/* * Check for valid clk_stop_timeout, use DisCo worst case value of @@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev)if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status (slave, slave->status);if (ret <0 ) -dev_warn (dev,"%s: update_status failed with status %d\n" , __func__, ret); +dev_warn (dev,"failed to update status: %d\n" , ret);the
__func__does help IMHO, 'failed to update status' is way too general...Quoted 2 lines
Error messages printed with
dev_warnwill include the device and driver names so this message will be quite specific still.Quoted 6 lines
The goal isn't to be 'quite specific' but rather 'completely straightforward'. Everyone can lookup a function name in a xref tool and
quickly find out what happened. Doing 'git grep' on message logs isn't
great really, and over time logs tend to be copy-pasted. Just look at the number of patches where we had to revisit thedev_errlogs to make then really unique/useful.
Quoted 3 lines
Error message should be self-contained and give user's some idea of what went wrong and not leak implementation details like function names (and be greppable, which "%s:" is not).
"Failed to update status" doesn't sound terribly self-contained to me.
It's actually a great example of making the logs less clear with good intentions. How many people know that the SoundWire bus exposes an 'update_status' callback, and that callback can be invoked from two completely different places (probe or on device attachment)?
/* Ensure driver knows that peripheral unattached */ ret = sdw_update_slave_status(slave, status[i]); if (ret < 0)
dev_warn(&slave->dev, "Update Slave status failed:%d\n", ret);
You absolutely want to know which of these two cases failed, but with your changes they now look rather identical except for the order of words. one would be 'failed to update status' and the other 'update status failed'.
What is much better is to know WHEN this failure happens, then folks looking at logs to fix a problem don't need to worry about precise wording or word order.
It's a constant battle to get meaningful messages that are useful for validation/integration folks, and my take is that it's a windmill-fighting endeavor. The function name is actually more useful, it's not an implementation detail, it's what you're looking for when reverse-engineering problematic sequences from a series of CI logs.
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Replacing 'with status' by ":" is fine, but do we really care about 10 chars in a log?
It's not primarily about the numbers of characters but about consistency.
I am advocating for inclusion of
__func__everywhere...It's simpler for remote support and bug chasing.
I meant everywhere in SoundWire. Other subsystems may have different views and different observability tools, that's fine.
Quoted 5 lines
A quick grep seems to suggest you're in a small minority here with some 5k of 65k
dev_err()including__func__.[ And there's only 55 out of 750
dev_err()like that indrivers/soundwire, which is inconsistent at best. ]
As you mentioned yourself, the asynchronous nature of the SoundWire probe/attachment/interrupts makes it difficult to reverse-engineer, and we want to err on the side of MORE information.
Also not all dev_err() are equal, most are part of paranoid checks and never used. An example above is the sysfs log, we've never seen it happen.
That's different to changes that impact probe and interrupts which will fail at some point on new platforms. It's not an academic statement, I've spent most of my day chasing two such issues.
Re: [PATCH v2 3/4] soundwire: bus: clean up probe warnings
Quoted 54 lines · Pierre-Louis Bossart
\
Quoted 28 lines
Quoted 21 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
drivers/soundwire/bus_type.c +1
-1@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev)/* init the dynamic sysfs attributes we need */ ret =sdw_slave_sysfs_dpn_init (slave);if (ret <0 ) -dev_warn (dev,"Slave sysfs init failed:%d\n" , ret); +dev_warn (dev,"failed to initialise sysfs: %d\n" , ret);Quoted 10 lines
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 150
Quoted 8 lines
drivers/soundwire/bus_type.c +1
-1/* * Check for valid clk_stop_timeout, use DisCo worst case value of @@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev)if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status (slave, slave->status);if (ret <0 ) -dev_warn (dev,"%s: update_status failed with status %d\n" , __func__, ret); +dev_warn (dev,"failed to update status: %d\n" , ret);the
__func__does help IMHO, 'failed to update status' is way too general...Quoted 2 lines
Error messages printed with
dev_warnwill include the device and driver names so this message will be quite specific still.Quoted 6 lines
The goal isn't to be 'quite specific' but rather 'completely straightforward'. Everyone can lookup a function name in a xref tool and
quickly find out what happened. Doing 'git grep' on message logs isn't
great really, and over time logs tend to be copy-pasted. Just look at the number of patches where we had to revisit thedev_errlogs to make then really unique/useful.Quoted 3 lines
Error message should be self-contained and give user's some idea of what went wrong and not leak implementation details like function names (and be greppable, which "%s:" is not).
"Failed to update status" doesn't sound terribly self-contained to me.
It's actually a great example of making the logs less clear with good intentions. How many people know that the SoundWire bus exposes an '
update_status' callback, and that callback can be invoked from two completely different places (probe or on device attachment)?/* Ensure driver knows that peripheral unattached */ ret =
sdw_update_slave_status(slave, status[i]); if (ret < 0)dev_warn(&slave->dev, "Update Slave status failed:%d\n", ret);You absolutely want to know which of these two cases failed, but with your changes they now look rather identical except for the order of words. one would be 'failed to update status' and the other 'update status failed'.
What is much better is to know WHEN this failure happens, then folks looking at logs to fix a problem don't need to worry about precise wording or word order.
Quoted 5 lines
It's a constant battle to get meaningful messages that are useful for validation/integration folks, and my take is that it's a windmill-fighting endeavor. The function name is actually more useful, it's not an implementation detail, it's what you're looking for when reverse-engineering problematic sequences from a series of CI logs.
Just add "at probe" to differentiate the two cases if you really think this is an issue:
dev_warn(dev, "failed to update status at probe: %d\n", ret);
Johan
Re: [PATCH v2 3/4] soundwire: bus: clean up probe warnings
Quoted 61 lines · Johan Hovold
Quoted 54 lines · Pierre-Louis Bossart
\
Quoted 28 lines
Quoted 21 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
(quoted diff) +1
-1@@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev) /* init the dynamic sysfs attributes we need */ ret = sdw_slave_sysfs_dpn_init(slave); if (ret < 0) - dev_warn(dev, "Slave sysfs init failed:%d\n", ret); + dev_warn(dev, "failed to initialise sysfs: %d\n", ret);Quoted 10 lines
Review static int sdw_drv_probe(struct device *dev) · line 150
Quoted 8 lines
(quoted diff) +1
-1/* * Check for valid clk_stop_timeout, use DisCo worst case value of@@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev) if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status(slave, slave->status); if (ret < 0) - dev_warn(dev, "%s: update_status failed with status %d\n", __func__, ret); + dev_warn(dev, "failed to update status: %d\n", ret);the
__func__does help IMHO, 'failed to update status' is way too general...Quoted 2 lines
Error messages printed with
dev_warnwill include the device and driver names so this message will be quite specific still.Quoted 6 lines
The goal isn't to be 'quite specific' but rather 'completely straightforward'. Everyone can lookup a function name in a xref tool and
quickly find out what happened. Doing 'git grep' on message logs isn't
great really, and over time logs tend to be copy-pasted. Just look at the number of patches where we had to revisit thedev_errlogs to make then really unique/useful.Quoted 3 lines
Error message should be self-contained and give user's some idea of what went wrong and not leak implementation details like function names (and be greppable, which "%s:" is not).
"Failed to update status" doesn't sound terribly self-contained to me.
It's actually a great example of making the logs less clear with good intentions. How many people know that the SoundWire bus exposes an '
update_status' callback, and that callback can be invoked from two completely different places (probe or on device attachment)?/* Ensure driver knows that peripheral unattached */ ret =
sdw_update_slave_status(slave, status[i]); if (ret < 0)dev_warn(&slave->dev, "Update Slave status failed:%d\n", ret);You absolutely want to know which of these two cases failed, but with your changes they now look rather identical except for the order of words. one would be 'failed to update status' and the other 'update status failed'.
What is much better is to know WHEN this failure happens, then folks looking at logs to fix a problem don't need to worry about precise wording or word order.
Quoted 5 lines
It's a constant battle to get meaningful messages that are useful for validation/integration folks, and my take is that it's a windmill-fighting endeavor. The function name is actually more useful, it's not an implementation detail, it's what you're looking for when reverse-engineering problematic sequences from a series of CI logs.
Quoted 4 lines
Just add "at probe" to differentiate the two cases if you really think this is an issue:
dev_warn(dev, "failed to update status at probe: %d\n", ret);
__func__ would provide equivalent functionality, only more precise... I guess it's time for Vinod and Bard to chime in.
PATCH v2 4/4 soundwire: bus: drop redundant probe debug message
In reply to Johan HovoldDrop the redundant probe debug message which is already provided by driver core. Whether probe succeeded can also be determined through sysfs.
--- drivers/soundwire/bus_type.c | 2 -- 1 file changed, 2 deletions(-)
drivers/soundwire/bus_type.c +0 -2
@@ -152,8 +152,6 @@ static int sdw_drv_probe(struct device *dev)mutex_unlock (&slave->sdw_dev_lock); -dev_dbg (dev,"probe complete\n" ); -return 0 ; }
Signature · 1 line
2.44.1
Re: [PATCH v2 4/4] soundwire: bus: drop redundant probe debug message
Quoted 14 lines · Johan Hovold
Drop the redundant probe debug message which is already provided by driver core. Whether probe succeeded can also be determined through sysfs.
Signed-off-by Johan Hovold <[email protected]>--- drivers/soundwire/bus_type.c | 2 -- 1 file changed, 2 deletions(-)drivers/soundwire/bus_type.c +0
-0
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 156
Quoted 7 lines
drivers/soundwire/bus_type.c +0
-2@@ -152,8 +152,6 @@ static int sdw_drv_probe(struct device *dev)mutex_unlock (&slave->sdw_dev_lock); -dev_dbg (dev,"probe complete\n" ); -return 0 ; }
I don't see the point of removing this, we've used it for the last 5 years to figure out when the probe complete vs. when the device becomes attached. It's a simple log that helped us immensely with race conditions, etc.
And no, sysfs is not a viable alternative to look at CI logs, and enabling dynamic debug on the driver core would be way to verbose.
Re: [PATCH v2 4/4] soundwire: bus: drop redundant probe debug message
Quoted 9 lines · Pierre-Louis Bossart
Quoted 8 lines · Johan Hovold
Drop the redundant probe debug message which is already provided by driver core. Whether probe succeeded can also be determined through sysfs.
drivers/soundwire/bus_type.c +0
-0@@ -152,8 +152,6 @@ static int sdw_drv_probe(struct device *dev)mutex_unlock (&slave->sdw_dev_lock);
Quoted 9 lines
drivers/soundwire/bus_type.c static int sdw_drv_probe(struct device *dev) · line 156
Quoted 4 lines
drivers/soundwire/bus_type.c +0
-2-dev_dbg (dev,"probe complete\n" ); -return 0 ; }I don't see the point of removing this, we've used it for the last 5 years to figure out when the probe complete vs. when the device becomes attached. It's a simple log that helped us immensely with race conditions, etc.
Fair enough. Soundwire probing is indeed a bit of a mess.
Johan