[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdWpXqbZqv9DnjHQouxOiqQcMy4qxj42PEYkPrUdm_xszg@mail.gmail.com>
Date: Fri, 30 Aug 2024 10:59:20 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Yang Ruibin <11162571@...o.com>
Cc: Kenneth Feng <kenneth.feng@....com>, Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
Xinhui Pan <Xinhui.Pan@....com>, David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Stephen Rothwell <sfr@...b.auug.org.au>, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
opensource.kernel@...o.com
Subject: Re: [PATCH v1] drivers:smumgr:Variable names should be consistent
with other modules
Hi Yang,
Thanks for your patch!
On Thu, Aug 22, 2024 at 9:11 AM Yang Ruibin <11162571@...o.com> wrote:
> The variable highest_pcie_level_enabled is named
> hightest_pcie_level_enabled in other modules.
> Please ensure the consistency of variable naming
> and use min macros instead of the triadic operator.
"hightest_pcie_level_enabled" is the wrong spelling, so the other modules
should be fixed instead:
drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
> Signed-off-by: Yang Ruibin <11162571@...o.com>
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> @@ -1012,19 +1012,18 @@ static int iceland_populate_all_graphic_levels(struct pp_hwmgr *hwmgr)
> lowest_pcie_level_enabled++;
> }
>
> - while ((count < highest_pcie_level_enabled) &&
> + while ((count < hightest_pcie_level_enabled) &&
> ((data->dpm_level_enable_mask.pcie_dpm_enable_mask &
> (1 << (lowest_pcie_level_enabled + 1 + count))) == 0)) {
> count++;
> }
>
> - mid_pcie_level_enabled = (lowest_pcie_level_enabled+1+count) < highest_pcie_level_enabled ?
> - (lowest_pcie_level_enabled+1+count) : highest_pcie_level_enabled;
> + mid_pcie_level_enabled = min(lowest_pcie_level_enabled + 1 + count,
> + hightest_pcie_level_enabled);
This is an unrelated change; please create a separate patch for this.
> -
> - /* set pcieDpmLevel to highest_pcie_level_enabled*/
> + /* set pcieDpmLevel to hightest_pcie_level_enabled*/
> for (i = 2; i < dpm_table->sclk_table.count; i++) {
> - smu_data->smc_state_table.GraphicsLevel[i].pcieDpmLevel = highest_pcie_level_enabled;
> + smu_data->smc_state_table.GraphicsLevel[i].pcieDpmLevel =
> + hightest_pcie_level_enabled;
> }
>
> /* set pcieDpmLevel to lowest_pcie_level_enabled*/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists