diff mbox series

[1/2] fixup! drm/bridge: ti-sn65dsi86: Train at faster rates if slower ones fail

Message ID 20191215200459.1018893-1-robdclark@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] fixup! drm/bridge: ti-sn65dsi86: Train at faster rates if slower ones fail | expand

Commit Message

Rob Clark Dec. 15, 2019, 8:04 p.m. UTC
From: Rob Clark <robdclark@chromium.org>

Fixes:

In file included from ../drivers/gpu/drm/bridge/ti-sn65dsi86.c:25:
../drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function ‘ti_sn_bridge_enable’:
../include/drm/drm_print.h:339:2: warning: ‘last_err_str’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  339 |  drm_dev_printk(dev, KERN_ERR, "*ERROR* " fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~
../drivers/gpu/drm/bridge/ti-sn65dsi86.c:650:14: note: ‘last_err_str’ was declared here
  650 |  const char *last_err_str;
      |              ^~~~~~~~~~~~
In file included from ../drivers/gpu/drm/bridge/ti-sn65dsi86.c:25:
../include/drm/drm_print.h:339:2: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  339 |  drm_dev_printk(dev, KERN_ERR, "*ERROR* " fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~
../drivers/gpu/drm/bridge/ti-sn65dsi86.c:654:6: note: ‘ret’ was declared here
  654 |  int ret;
      |      ^~~
  Building modules, stage 2.
---
 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Doug Anderson Dec. 18, 2019, 12:52 a.m. UTC | #1
Hi,

On Sun, Dec 15, 2019 at 12:05 PM Rob Clark <robdclark@gmail.com> wrote:
>
> From: Rob Clark <robdclark@chromium.org>
>
> Fixes:
>
> In file included from ../drivers/gpu/drm/bridge/ti-sn65dsi86.c:25:
> ../drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function ‘ti_sn_bridge_enable’:
> ../include/drm/drm_print.h:339:2: warning: ‘last_err_str’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>   339 |  drm_dev_printk(dev, KERN_ERR, "*ERROR* " fmt, ##__VA_ARGS__)
>       |  ^~~~~~~~~~~~~~
> ../drivers/gpu/drm/bridge/ti-sn65dsi86.c:650:14: note: ‘last_err_str’ was declared here
>   650 |  const char *last_err_str;
>       |              ^~~~~~~~~~~~
> In file included from ../drivers/gpu/drm/bridge/ti-sn65dsi86.c:25:
> ../include/drm/drm_print.h:339:2: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>   339 |  drm_dev_printk(dev, KERN_ERR, "*ERROR* " fmt, ##__VA_ARGS__)
>       |  ^~~~~~~~~~~~~~
> ../drivers/gpu/drm/bridge/ti-sn65dsi86.c:654:6: note: ‘ret’ was declared here
>   654 |  int ret;
>       |      ^~~
>   Building modules, stage 2.
> ---
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks!  I have rolled this into my v2.

-Doug
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index cb774ee536cd..976f98991b3d 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -618,11 +618,11 @@  static int ti_sn_link_training(struct ti_sn_bridge *pdata, int dp_rate_idx,
 static void ti_sn_bridge_enable(struct drm_bridge *bridge)
 {
 	struct ti_sn_bridge *pdata = bridge_to_ti_sn_bridge(bridge);
-	const char *last_err_str;
+	const char *last_err_str = "No supported DP rate";
 	int dp_rate_idx;
 	int max_dp_rate_idx;
 	unsigned int val;
-	int ret;
+	int ret = -EINVAL;
 
 	/*
 	 * Run with the maximum number of lanes that the DP sink supports.