[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_MXK_H-g4GReU1dGca2PAXsGjbzg47kcWjXFQ4DrYG8tg@mail.gmail.com>
Date: Tue, 23 Feb 2021 12:42:05 -0500
From: Alex Deucher <alexdeucher@...il.com>
To: Bas Nieuwenhuizen <bas@...nieuwenhuizen.nl>
Cc: Simon Ser <contact@...rsion.fr>, Stylon Wang <stylon.wang@....com>,
"Leo (Sunpeng) Li" <sunpeng.li@....com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
"Siqueira, Rodrigo" <Rodrigo.Siqueira@....com>,
LKML <linux-kernel@...r.kernel.org>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
"Kazlauskas, Nicholas" <nicholas.kazlauskas@....com>,
Nathan Chancellor <nathan@...nel.org>,
Dave Airlie <airlied@...ux.ie>,
Aurabindo Pillai <aurabindo.pillai@....com>,
Souptick Joarder <jrdr.linux@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
"Deucher, Alexander" <alexander.deucher@....com>,
"Wentland, Harry" <harry.wentland@....com>,
Christian Koenig <christian.koenig@....com>
Subject: Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
yeah, fdo ran out of disk space so I moved to gitlab:
https://gitlab.freedesktop.org/agd5f/linux/-/commits/drm-next
Alex
On Mon, Feb 22, 2021 at 7:26 PM Bas Nieuwenhuizen
<bas@...nieuwenhuizen.nl> wrote:
>
> I think Alex moved to gitlab for his branches
>
> On Tue, Feb 23, 2021, 12:50 AM Simon Ser <contact@...rsion.fr> wrote:
>>
>> On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor <nathan@...nel.org> wrote:
>>
>> > On Mon, Feb 22, 2021 at 11:05:17PM +0000, Simon Ser wrote:
>> > > On Monday, February 22nd, 2021 at 8:25 PM, Souptick Joarder <jrdr.linux@...il.com> wrote:
>> > >
>> > > > >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38:
>> > > > >> warning: variable 'i' is uninitialized when used here
>> > > > >> [-Wuninitialized]
>> > > > timing = &edid->detailed_timings[i];
>> > > > ^
>> > > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9714:7:
>> > > > note: initialize the variable 'i' to silence this warning
>> > > > int i;
>> > > > ^
>> > > > = 0
>> > > > 1 warning generated.
>> > > >
>> > > > Initialize the variable 'i'.
>> > >
>> > > Hm, I see this variable already initialized in the loop:
>> > >
>> > > for (i = 0; i < 4; i++) {
>> > >
>> > > This is the branch agd5f/drm-next.
>> >
>> > That is in the
>> >
>> > if (amdgpu_dm_connector->dc_sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT
>> > || amdgpu_dm_connector->dc_sink->sink_signal == SIGNAL_TYPE_EDP) {
>> >
>> > branch not the
>> >
>> > } else if (edid && amdgpu_dm_connector->dc_sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A) {
>> >
>> > branch, where i is indeed used uninitialized like clang complains about.
>> >
>> > I am not at all familiar with the code so I cannot say if this fix is
>> > the proper one but it is definitely a legitimate issue.
>>
>> I think you have an outdated branch. In my checkout, i is not used in the first
>> branch, and is initialized in the second one.
>>
>> https://cgit.freedesktop.org/~agd5f/linux/tree/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c?h=drm-next#n9700
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists