* [PATCH] drm/amdgpu/display: initialize the variable 'i'
@ 2021-02-22 19:25 Souptick Joarder
2021-02-22 23:05 ` Simon Ser
2021-02-23 17:46 ` Alex Deucher
0 siblings, 2 replies; 9+ messages in thread
From: Souptick Joarder @ 2021-02-22 19:25 UTC (permalink / raw)
To: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig,
airlied, daniel, nicholas.kazlauskas, Rodrigo.Siqueira,
aurabindo.pillai, stylon.wang, contact, bas, Bhawanpreet.Lakha
Cc: Souptick Joarder, dri-devel, amd-gfx, linux-kernel
>> 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'.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a22a53d..e96d3d9 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9717,7 +9717,7 @@ static bool parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector,
void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
struct edid *edid)
{
- int i;
+ int i = 0;
struct detailed_timing *timing;
struct detailed_non_pixel *data;
struct detailed_data_monitor_range *range;
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-22 19:25 [PATCH] drm/amdgpu/display: initialize the variable 'i' Souptick Joarder
@ 2021-02-22 23:05 ` Simon Ser
2021-02-22 23:44 ` Nathan Chancellor
2021-02-23 17:46 ` Alex Deucher
1 sibling, 1 reply; 9+ messages in thread
From: Simon Ser @ 2021-02-22 23:05 UTC (permalink / raw)
To: Souptick Joarder
Cc: stylon.wang, sunpeng.li, Bhawanpreet.Lakha, Rodrigo.Siqueira,
linux-kernel, amd-gfx, nicholas.kazlauskas, airlied,
aurabindo.pillai, dri-devel, alexander.deucher, christian.koenig
On Monday, February 22nd, 2021 at 8:25 PM, Souptick Joarder <jrdr.linux@gmail.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.
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index a22a53d..e96d3d9 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -9717,7 +9717,7 @@ static bool parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector,
> void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
> struct edid *edid)
> {
> - int i;
> + int i = 0;
> struct detailed_timing *timing;
> struct detailed_non_pixel *data;
> struct detailed_data_monitor_range *range;
> --
> 1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-22 23:05 ` Simon Ser
@ 2021-02-22 23:44 ` Nathan Chancellor
2021-02-22 23:50 ` Simon Ser
0 siblings, 1 reply; 9+ messages in thread
From: Nathan Chancellor @ 2021-02-22 23:44 UTC (permalink / raw)
To: Simon Ser
Cc: stylon.wang, sunpeng.li, Bhawanpreet.Lakha, dri-devel,
Rodrigo.Siqueira, linux-kernel, amd-gfx, nicholas.kazlauskas,
airlied, aurabindo.pillai, Souptick Joarder, alexander.deucher,
christian.koenig
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@gmail.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.
Cheers,
Nathan
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > index a22a53d..e96d3d9 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -9717,7 +9717,7 @@ static bool parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector,
> > void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
> > struct edid *edid)
> > {
> > - int i;
> > + int i = 0;
> > struct detailed_timing *timing;
> > struct detailed_non_pixel *data;
> > struct detailed_data_monitor_range *range;
> > --
> > 1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-22 23:44 ` Nathan Chancellor
@ 2021-02-22 23:50 ` Simon Ser
2021-02-23 0:00 ` Nathan Chancellor
2021-02-23 0:25 ` Bas Nieuwenhuizen
0 siblings, 2 replies; 9+ messages in thread
From: Simon Ser @ 2021-02-22 23:50 UTC (permalink / raw)
To: Nathan Chancellor
Cc: stylon.wang, sunpeng.li, Bhawanpreet.Lakha, dri-devel,
Rodrigo.Siqueira, linux-kernel, amd-gfx, nicholas.kazlauskas,
airlied, aurabindo.pillai, Souptick Joarder, alexander.deucher,
christian.koenig
On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor <nathan@kernel.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@gmail.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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-22 23:50 ` Simon Ser
@ 2021-02-23 0:00 ` Nathan Chancellor
2021-02-23 0:25 ` Bas Nieuwenhuizen
1 sibling, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2021-02-23 0:00 UTC (permalink / raw)
To: Simon Ser
Cc: stylon.wang, sunpeng.li, Rodrigo.Siqueira, linux-kernel,
dri-devel, christian.koenig, airlied, aurabindo.pillai, amd-gfx,
alexander.deucher, Bhawanpreet.Lakha, nicholas.kazlauskas,
Souptick Joarder
On Mon, Feb 22, 2021 at 11:50:06PM +0000, Simon Ser wrote:
> On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor <nathan@kernel.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@gmail.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
That branch is the outdated one:
https://git.kernel.org/linus/a897913a819191550ab2fa2784d3c3ada3a096d3
Please see:
https://gitlab.freedesktop.org/agd5f/linux/-/blob/amd-staging-drm-next/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c#L9854
It was introduced by commit f9b4f20c4777 ("drm/amd/display: Add Freesync
HDMI support to DM").
Cheers,
Nathan
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-22 23:50 ` Simon Ser
2021-02-23 0:00 ` Nathan Chancellor
@ 2021-02-23 0:25 ` Bas Nieuwenhuizen
2021-02-23 17:42 ` Alex Deucher
1 sibling, 1 reply; 9+ messages in thread
From: Bas Nieuwenhuizen @ 2021-02-23 0:25 UTC (permalink / raw)
To: Simon Ser
Cc: stylon.wang, sunpeng.li, Bhawanpreet.Lakha, dri-devel,
Rodrigo.Siqueira, linux-kernel, amd-gfx, nicholas.kazlauskas,
Nathan Chancellor, airlied, aurabindo.pillai, Souptick Joarder,
alexander.deucher, christian.koenig
[-- Attachment #1.1: Type: text/plain, Size: 1968 bytes --]
I think Alex moved to gitlab for his branches
On Tue, Feb 23, 2021, 12:50 AM Simon Ser <contact@emersion.fr> wrote:
> On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor <
> nathan@kernel.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@gmail.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
>
[-- Attachment #1.2: Type: text/html, Size: 3054 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-23 0:25 ` Bas Nieuwenhuizen
@ 2021-02-23 17:42 ` Alex Deucher
2021-02-23 17:44 ` Simon Ser
0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2021-02-23 17:42 UTC (permalink / raw)
To: Bas Nieuwenhuizen
Cc: Stylon Wang, Leo (Sunpeng) Li, Siqueira, Rodrigo, LKML,
Maling list - DRI developers, Christian Koenig,
Nathan Chancellor, Dave Airlie, Aurabindo Pillai, amd-gfx list,
Deucher, Alexander, Bhawanpreet Lakha, Kazlauskas, Nicholas,
Souptick Joarder
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@basnieuwenhuizen.nl> wrote:
>
> I think Alex moved to gitlab for his branches
>
> On Tue, Feb 23, 2021, 12:50 AM Simon Ser <contact@emersion.fr> wrote:
>>
>> On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor <nathan@kernel.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@gmail.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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-23 17:42 ` Alex Deucher
@ 2021-02-23 17:44 ` Simon Ser
0 siblings, 0 replies; 9+ messages in thread
From: Simon Ser @ 2021-02-23 17:44 UTC (permalink / raw)
To: Alex Deucher
Cc: Stylon Wang, Leo (Sunpeng) Li, Siqueira, Rodrigo, LKML,
Maling list - DRI developers, Christian Koenig,
Nathan Chancellor, Dave Airlie, Aurabindo Pillai, amd-gfx list,
Deucher, Alexander, Bhawanpreet Lakha, Kazlauskas, Nicholas,
Souptick Joarder
On Tuesday, February 23rd, 2021 at 6:42 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> yeah, fdo ran out of disk space so I moved to gitlab:
>
> https://gitlab.freedesktop.org/agd5f/linux/-/commits/drm-next
Ah, thanks for the info, my bad!
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
2021-02-22 19:25 [PATCH] drm/amdgpu/display: initialize the variable 'i' Souptick Joarder
2021-02-22 23:05 ` Simon Ser
@ 2021-02-23 17:46 ` Alex Deucher
1 sibling, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2021-02-23 17:46 UTC (permalink / raw)
To: Souptick Joarder
Cc: Stylon Wang, Leo (Sunpeng) Li, Siqueira, Rodrigo, LKML,
Maling list - DRI developers, Kazlauskas, Nicholas,
Bhawanpreet Lakha, Dave Airlie, Aurabindo Pillai, amd-gfx list,
Deucher, Alexander, Christian Koenig
On Mon, Feb 22, 2021 at 3:13 PM Souptick Joarder <jrdr.linux@gmail.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'.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index a22a53d..e96d3d9 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -9717,7 +9717,7 @@ static bool parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector,
> void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
> struct edid *edid)
> {
> - int i;
> + int i = 0;
> struct detailed_timing *timing;
> struct detailed_non_pixel *data;
> struct detailed_data_monitor_range *range;
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-02-23 17:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 19:25 [PATCH] drm/amdgpu/display: initialize the variable 'i' Souptick Joarder
2021-02-22 23:05 ` Simon Ser
2021-02-22 23:44 ` Nathan Chancellor
2021-02-22 23:50 ` Simon Ser
2021-02-23 0:00 ` Nathan Chancellor
2021-02-23 0:25 ` Bas Nieuwenhuizen
2021-02-23 17:42 ` Alex Deucher
2021-02-23 17:44 ` Simon Ser
2021-02-23 17:46 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).