component: Silence bind error on -EPROBE_DEFER
Subsystems (2)
PATCH 1/1 component: Silence bind error on -EPROBE_DEFER
If a component fails to bind due to -EPROBE_DEFER we should not log an error as this is not a real failure.
Fixes:
vc4-drm soc:gpu: failed to bind 3f902000.hdmi (ops vc4_hdmi_ops): -517 vc4-drm soc:gpu: master bind failed: -517
--- drivers/base/component.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/base/component.c +6 -3
@@ -256,7 +256,8 @@ static int try_to_bring_up_master(struct master *master, ret = master->ops->bind (master->dev);if (ret <0 ) {devres_release_group (master->dev,NULL ); -dev_info (master->dev,"master bind failed: %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_info (master->dev,"master bind failed: %d\n" , ret);return ret; }
@@ -611,8 +612,10 @@ static int component_bind(struct component *component, struct master *master,devres_release_group (component->dev,NULL );devres_release_group (master->dev,NULL ); -dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , -dev_name (component->dev), component->ops, ret); +if (ret != -EPROBE_DEFER ) { +dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , +dev_name (component->dev), component->ops, ret); + } }return ret;
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · James Hilliard
If a component fails to bind due to -EPROBE_DEFER we should not log an error as this is not a real failure.
Fixes:
vc4-drm soc:gpu: failed to bind 3f902000.hdmi (opsvc4_hdmi_ops): -517 vc4-drm soc:gpu: master bind failed: -517
I'd think the probe defer is useful information anyway. Maybe just tone down the severity and/or the message?
BR,
Jani.
Quoted 33 lines
Signed-off-by James Hilliard <[email protected]>--- drivers/base/component.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/base/component.c +6
-3@@ -256,7 +256,8 @@ static int try_to_bring_up_master(struct master *master, ret = master->ops->bind (master->dev);if (ret <0 ) {devres_release_group (master->dev,NULL ); -dev_info (master->dev,"master bind failed: %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_info (master->dev,"master bind failed: %d\n" , ret);return ret; }@@ -611,8 +612,10 @@ static int component_bind(struct component *component, struct master *master,devres_release_group (component->dev,NULL );devres_release_group (master->dev,NULL ); -dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , -dev_name (component->dev), component->ops, ret); +if (ret != -EPROBE_DEFER ) { +dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , +dev_name (component->dev), component->ops, ret); + } }return ret;
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Jani Nikula
Quoted 6 lines · James Hilliard
If a component fails to bind due to -EPROBE_DEFER we should not log an error as this is not a real failure.
Fixes:
vc4-drm soc:gpu: failed to bind 3f902000.hdmi (opsvc4_hdmi_ops): -517 vc4-drm soc:gpu: master bind failed: -517I'd think the probe defer is useful information anyway. Maybe just tone down the severity and/or the message?
That's probably not needed as there's dev_dbg logging for -EPROBE_DEFER elsewhere from what it looks like.
For example:
https://github.com/torvalds/linux/blob/v5.6/drivers/base/dd.c#L621
Quoted 36 lines
BR,
Jani.Quoted 32 lines
Signed-off-by James Hilliard <[email protected]>--- drivers/base/component.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/base/component.c +6
-3@@ -256,7 +256,8 @@ static int try_to_bring_up_master(struct master *master, ret = master->ops->bind (master->dev);if (ret <0 ) {devres_release_group (master->dev,NULL ); -dev_info (master->dev,"master bind failed: %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_info (master->dev,"master bind failed: %d\n" , ret);return ret; }@@ -611,8 +612,10 @@ static int component_bind(struct component *component, struct master *master,devres_release_group (component->dev,NULL );devres_release_group (master->dev,NULL ); -dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , -dev_name (component->dev), component->ops, ret); +if (ret != -EPROBE_DEFER ) { +dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , +dev_name (component->dev), component->ops, ret); + } }
Quoted 4 lines
drivers/base/component.c static int component_bind(struct component *component, struct master *master, · line 621
Quoted 1 line
drivers/base/component.c +0
-0return ret;--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · James Hilliard
Quoted 5 lines · Jani Nikula
Quoted 3 lines · James Hilliard
If a component fails to bind due to -EPROBE_DEFER we should not log an error as this is not a real failure.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Fixes:
vc4-drm soc:gpu: failed to bind 3f902000.hdmi (opsvc4_hdmi_ops): -517 vc4-drm soc:gpu: master bind failed: -517I'd think the probe defer is useful information anyway. Maybe just tone down the severity and/or the message?
That's probably not needed as there's
dev_dbglogging for -EPROBE_DEFER elsewhere from what it looks like.
If you say so; I don't have the time to go through all the code paths.
BR,
Jani.
Quoted 43 lines
For example:
https://github.com/torvalds/linux/blob/v5.6/drivers/base/dd.c#L621Quoted 40 lines
BR,
Jani.Quoted 23 lines
Signed-off-by James Hilliard <[email protected]>--- drivers/base/component.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/base/component.c +2
-1@@ -256,7 +256,8 @@ static int try_to_bring_up_master(struct master *master, ret = master->ops->bind (master->dev);if (ret <0 ) {devres_release_group (master->dev,NULL ); -dev_info (master->dev,"master bind failed: %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_info (master->dev,"master bind failed: %d\n" , ret);return ret; }@@ -611,8 +612,10 @@ static int component_bind(struct component *component, struct master *master,devres_release_group (component->dev,NULL );devres_release_group (master->dev,NULL );drivers/base/component.c static int component_bind(struct component *component, struct master *master, · line 621
Quoted 10 lines
drivers/base/component.c +4
-2-dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , -dev_name (component->dev), component->ops, ret); +if (ret != -EPROBE_DEFER ) { +dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , +dev_name (component->dev), component->ops, ret); + } }return ret;--
Jani Nikula, Intel Open Source Graphics Center
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel