All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: zhong jiang <zhongjiang@huawei.com>
Cc: airlied@linux.ie, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: sun4i: Fix a uninitialized variable warning.
Date: Fri, 21 Sep 2018 16:26:54 +0200	[thread overview]
Message-ID: <20180921142654.ahuhswypvscjsuyj@flea> (raw)
In-Reply-To: <5BA2106C.2080007@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

On Wed, Sep 19, 2018 at 05:01:32PM +0800, zhong jiang wrote:
> On 2018/9/19 16:47, Maxime Ripard wrote:
> > On Tue, Sep 18, 2018 at 03:25:20PM +0800, zhong jiang wrote:
> >> 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>
> > I can't see any code path that would lead to an uninitialized usage of
> > that variable.
> >
> > Which compiler produced that warning? I tried building it today with
> > gcc 8.1.1, and I don't see that warning either.
>
> I indeed  hit the issue.  the gcc version is
> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

I've tested with 4.* gcc, and it didn't report any error. It seems to
be a false positive for this particular version, so there's no need to
merge that patch. If more people are affected, we'll obviously do
something about it though.

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drm: sun4i: Fix a uninitialized variable warning.
Date: Fri, 21 Sep 2018 16:26:54 +0200	[thread overview]
Message-ID: <20180921142654.ahuhswypvscjsuyj@flea> (raw)
In-Reply-To: <5BA2106C.2080007@huawei.com>

On Wed, Sep 19, 2018 at 05:01:32PM +0800, zhong jiang wrote:
> On 2018/9/19 16:47, Maxime Ripard wrote:
> > On Tue, Sep 18, 2018 at 03:25:20PM +0800, zhong jiang wrote:
> >> 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>
> > I can't see any code path that would lead to an uninitialized usage of
> > that variable.
> >
> > Which compiler produced that warning? I tried building it today with
> > gcc 8.1.1, and I don't see that warning either.
>
> I indeed  hit the issue.  the gcc version is
> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

I've tested with 4.* gcc, and it didn't report any error. It seems to
be a false positive for this particular version, so there's no need to
merge that patch. If more people are affected, we'll obviously do
something about it though.

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180921/4c54ac45/attachment.sig>

  reply	other threads:[~2018-09-21 14:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  7:25 [PATCH] drm: sun4i: Fix a uninitialized variable warning zhong jiang
2018-09-18  7:25 ` 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 [this message]
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=20180921142654.ahuhswypvscjsuyj@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=airlied@linux.ie \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhongjiang@huawei.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.