[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_PB=z9JeVV4c1YC6hbAXXvHPLbD=kZvOyS1QxR-WMU9Gw@mail.gmail.com>
Date: Tue, 20 Sep 2022 12:11:19 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: cgel.zte@...il.com
Cc: alexander.deucher@....com, airlied@...ux.ie,
ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>, Xinhui.Pan@....com,
linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, evan.quan@....com,
christian.koenig@....com
Subject: Re: [PATCH linux-next] drm/amd/pm: Remove unneeded result variable
Applied. Thanks!
On Tue, Sep 20, 2022 at 2:36 AM <cgel.zte@...il.com> wrote:
>
> From: ye xingchen <ye.xingchen@....com.cn>
>
> Return the value atomctrl_initialize_mc_reg_table_v2_2() directly instead
> of storing it in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
> drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> index 45214a364baa..e7ed2a7adf8f 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> @@ -2567,15 +2567,13 @@ static uint8_t polaris10_get_memory_modile_index(struct pp_hwmgr *hwmgr)
>
> static int polaris10_initialize_mc_reg_table(struct pp_hwmgr *hwmgr)
> {
> - int result;
> struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend);
> pp_atomctrl_mc_reg_table *mc_reg_table = &smu_data->mc_reg_table;
> uint8_t module_index = polaris10_get_memory_modile_index(hwmgr);
>
> memset(mc_reg_table, 0, sizeof(pp_atomctrl_mc_reg_table));
> - result = atomctrl_initialize_mc_reg_table_v2_2(hwmgr, module_index, mc_reg_table);
>
> - return result;
> + return atomctrl_initialize_mc_reg_table_v2_2(hwmgr, module_index, mc_reg_table);
> }
>
> static bool polaris10_is_dpm_running(struct pp_hwmgr *hwmgr)
> --
> 2.25.1
Powered by blists - more mailing lists