[<prev] [next>] [day] [month] [year] [list]
Message-ID:
<AS8PR02MB102171DCC74A29A74E28265409C93A@AS8PR02MB10217.eurprd02.prod.outlook.com>
Date: Fri, 16 May 2025 08:21:54 +0000
From: David Binderman <dcb314@...mail.com>
To: "austin.zheng@....com" <austin.zheng@....com>, "jun.lei@....com"
<jun.lei@....com>, "harry.wentland@....com" <harry.wentland@....com>,
"sunpeng.li@....com" <sunpeng.li@....com>, "siqueira@...lia.com"
<siqueira@...lia.com>, "alexander.deucher@....com"
<alexander.deucher@....com>, "christian.koenig@....com"
<christian.koenig@....com>, "airlied@...il.com" <airlied@...il.com>,
"simona@...ll.ch" <simona@...ll.ch>, "amd-gfx@...ts.freedesktop.org"
<amd-gfx@...ts.freedesktop.org>, "dri-devel@...ts.freedesktop.org"
<dri-devel@...ts.freedesktop.org>, Linux Kernel Mailing List
<linux-kernel@...r.kernel.org>
Subject:
linux-6.15-rc6/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c:
possible cut'n'paste error ?
Hello there,
Static analyser cppcheck says:
linux-6.15-rc6/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c:595:45: style: Variable 'p->out_states->state_array[i].dtbclk_mhz' is reassigned a value before the old one has been used. [redundantAssignment]
linux-6.15-rc6/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c:594:45: style: Variable 'p->out_states->state_array[i].phyclk_mhz' is reassigned a value before the old one has been used. [redundantAssignment]
Source code is
p->out_states->state_array[i].dppclk_mhz = max_dppclk_mhz;
p->out_states->state_array[i].dtbclk_mhz = max_dtbclk_mhz;
p->out_states->state_array[i].phyclk_mhz = max_phyclk_mhz;
p->out_states->state_array[i].dscclk_mhz = max_dispclk_mhz / 3.0;
p->out_states->state_array[i].phyclk_mhz = max_phyclk_mhz;
p->out_states->state_array[i].dtbclk_mhz = max_dtbclk_mhz;
Suggest code rework.
Regards
David Binderman
Powered by blists - more mailing lists