All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang@huawei.com>
To: <airlied@linux.ie>, <maxime.ripard@bootlin.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] drm: sun4i: Fix a uninitialized variable warning.
Date: Tue, 18 Sep 2018 15:25:20 +0800	[thread overview]
Message-ID: <1537255520-41614-1-git-send-email-zhongjiang@huawei.com> (raw)

Fix the following compile warning:

drivers/gpu/drm/sun4i/sun4i_tcon.c:1088: warning: 'has_lvds_alt' may be used uninitialized in this function [-Wmaybe-uninitialized]
bool has_lvds_rst, has_lvds_alt, can_lvds;

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index c78cd35..563cc8f 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -1086,7 +1086,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
 	struct device_node *remote;
 	struct sun4i_tcon *tcon;
 	struct reset_control *edp_rstc;
-	bool has_lvds_rst, has_lvds_alt, can_lvds;
+	bool has_lvds_rst, has_lvds_alt = false, can_lvds;
 	int ret;
 
 	engine = sun4i_tcon_find_engine(drv, dev->of_node);
-- 
1.7.12.4


WARNING: multiple messages have this Message-ID (diff)
From: zhongjiang@huawei.com (zhong jiang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drm: sun4i: Fix a uninitialized variable warning.
Date: Tue, 18 Sep 2018 15:25:20 +0800	[thread overview]
Message-ID: <1537255520-41614-1-git-send-email-zhongjiang@huawei.com> (raw)

Fix the following compile warning:

drivers/gpu/drm/sun4i/sun4i_tcon.c:1088: warning: 'has_lvds_alt' may be used uninitialized in this function [-Wmaybe-uninitialized]
bool has_lvds_rst, has_lvds_alt, can_lvds;

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index c78cd35..563cc8f 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -1086,7 +1086,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
 	struct device_node *remote;
 	struct sun4i_tcon *tcon;
 	struct reset_control *edp_rstc;
-	bool has_lvds_rst, has_lvds_alt, can_lvds;
+	bool has_lvds_rst, has_lvds_alt = false, can_lvds;
 	int ret;
 
 	engine = sun4i_tcon_find_engine(drv, dev->of_node);
-- 
1.7.12.4

             reply	other threads:[~2018-09-18  7:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  7:25 zhong jiang [this message]
2018-09-18  7:25 ` [PATCH] drm: sun4i: Fix a uninitialized variable warning zhong jiang
2018-09-19  8:47 ` Maxime Ripard
2018-09-19  8:47   ` Maxime Ripard
2018-09-19  9:01   ` zhong jiang
2018-09-19  9:01     ` zhong jiang
2018-09-21 14:26     ` Maxime Ripard
2018-09-21 14:26       ` Maxime Ripard
2018-09-21 14:49       ` zhong jiang
2018-09-21 14:49         ` zhong jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537255520-41614-1-git-send-email-zhongjiang@huawei.com \
    --to=zhongjiang@huawei.com \
    --cc=airlied@linux.ie \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.