drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log
Subsystems (4)
PATCH 1/1 drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log
If devm_drm_of_get_bridge() can't find the connected bridge, it returns an ERR_PTR(-EPROBE_DEFER) to indicate that the probe should be deferred.
But this path also prints an error message, which pollutes the kernel log since is printed on every probe deferral, i.e:
$ dmesg | grep "failed to create panel bridge" | wc -l 38
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/bridge/ti-sn65dsi86.c +3 -4
@@ -1206,10 +1206,9 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,int ret; pdata->next_bridge =devm_drm_of_get_bridge (pdata->dev, np,1 ,0 ); -if (IS_ERR (pdata->next_bridge)) { -DRM_ERROR ("failed to create panel bridge\n" ); -return PTR_ERR (pdata->next_bridge); - } +if (IS_ERR (pdata->next_bridge)) +return dev_err_probe (pdata->dev,PTR_ERR (pdata->next_bridge), +"failed to create panel bridge\n" );ti_sn_bridge_parse_lanes (pdata, np);
Signature · 1 line
2.36.1
Quoted 23 lines · Javier Martinez Canillas
If
devm_drm_of_get_bridge()can't find the connected bridge, it returns anERR_PTR(-EPROBE_DEFER)to indicate that the probe should be deferred.But this path also prints an error message, which pollutes the kernel log since is printed on every probe deferral, i.e:
$ dmesg | grep "failed to create panel bridge" | wc -l 38Signed-off-by Javier Martinez Canillas <[email protected]>---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/bridge/ti-sn65dsi86.c +0
-0@@ -1206,10 +1206,9 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,int ret; pdata->next_bridge =devm_drm_of_get_bridge (pdata->dev, np,1 ,0 );
drivers/gpu/drm/bridge/ti-sn65dsi86.c static int ti_sn_bridge_probe(struct auxiliary_device *adev, · line 1214
Quoted 10 lines
drivers/gpu/drm/bridge/ti-sn65dsi86.c +3
-4-if (IS_ERR (pdata->next_bridge)) { -DRM_ERROR ("failed to create panel bridge\n" ); -return PTR_ERR (pdata->next_bridge); - } +if (IS_ERR (pdata->next_bridge)) +return dev_err_probe (pdata->dev,PTR_ERR (pdata->next_bridge), +"failed to create panel bridge\n" );ti_sn_bridge_parse_lanes (pdata, np);
Quoted 10 lines · Javier Martinez Canillas
If
devm_drm_of_get_bridge()can't find the connected bridge, it returns anERR_PTR(-EPROBE_DEFER)to indicate that the probe should be deferred.But this path also prints an error message, which pollutes the kernel log since is printed on every probe deferral, i.e:
$ dmesg | grep "failed to create panel bridge" | wc -l 38Signed-off-by Javier Martinez Canillas <[email protected]>
Regards
Andrzej
Quoted 23 lines
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/bridge/ti-sn65dsi86.c +3
-4@@ -1206,10 +1206,9 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,int ret; pdata->next_bridge =devm_drm_of_get_bridge (pdata->dev, np,1 ,0 ); -if (IS_ERR (pdata->next_bridge)) { -DRM_ERROR ("failed to create panel bridge\n" ); -return PTR_ERR (pdata->next_bridge); - } +if (IS_ERR (pdata->next_bridge)) +return dev_err_probe (pdata->dev,PTR_ERR (pdata->next_bridge), +"failed to create panel bridge\n" );ti_sn_bridge_parse_lanes (pdata, np);
Hi,
Quoted 7 lines · Javier Martinez Canillas
If
devm_drm_of_get_bridge()can't find the connected bridge, it returns anERR_PTR(-EPROBE_DEFER)to indicate that the probe should be deferred.But this path also prints an error message, which pollutes the kernel log since is printed on every probe deferral, i.e:
Quoted 8 lines
$ dmesg | grep "failed to create panel bridge" | wc -l 38Signed-off-by Javier Martinez Canillas <[email protected]>---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
If someone else doesn't beat me to it, I'll apply next week sometime.
Quoted 17 lines · Doug Anderson
Hi,
Quoted 13 lines · Javier Martinez Canillas
If
devm_drm_of_get_bridge()can't find the connected bridge, it returns anERR_PTR(-EPROBE_DEFER)to indicate that the probe should be deferred.But this path also prints an error message, which pollutes the kernel log since is printed on every probe deferral, i.e:
$ dmesg | grep "failed to create panel bridge" | wc -l 38Signed-off-by Javier Martinez Canillas <[email protected]>---
Quoted 7 lines
Quoted 2 lines
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)Reviewed-by Douglas Anderson <[email protected]>If someone else doesn't beat me to it, I'll apply next week sometime.
I've pushed this to drm-misc (drm-misc-next). Thanks all!
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat