[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32vjVDssCxltB75h5jHin2U3-cvNjmd_HFnRLiKohhbXkTfZea3hw2Knd80SgcHoyIFldMNwqh49t28hMBvta0HeWed1L0q_efLJ8QCgNw8=@emersion.fr>
Date: Mon, 22 Feb 2021 23:05:17 +0000
From: Simon Ser <contact@...rsion.fr>
To: Souptick Joarder <jrdr.linux@...il.com>
Cc: harry.wentland@....com, sunpeng.li@....com,
alexander.deucher@....com, christian.koenig@....com,
airlied@...ux.ie, daniel@...ll.ch, nicholas.kazlauskas@....com,
Rodrigo.Siqueira@....com, aurabindo.pillai@....com,
stylon.wang@....com, bas@...nieuwenhuizen.nl,
Bhawanpreet.Lakha@....com, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'
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.
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@...il.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
Powered by blists - more mailing lists