[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CYYPR12MB86557E4BD32B6043B25E7A369C942@CYYPR12MB8655.namprd12.prod.outlook.com>
Date: Tue, 27 Aug 2024 06:53:00 +0000
From: "Yuan, Perry" <Perry.Yuan@....com>
To: Mario Limonciello <superm1@...nel.org>, Borislav Petkov <bp@...en8.de>,
"Shenoy, Gautham Ranjal" <gautham.shenoy@....com>
CC: "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"Rafael J . Wysocki" <rafael@...nel.org>, "open list:X86 ARCHITECTURE (32-BIT
AND 64-BIT)" <linux-kernel@...r.kernel.org>, "open list:ACPI"
<linux-acpi@...r.kernel.org>, "open list:CPU FREQUENCY SCALING FRAMEWORK"
<linux-pm@...r.kernel.org>, "Limonciello, Mario" <Mario.Limonciello@....com>
Subject: RE: [PATCH 8/8] cpufreq: amd-pstate: Drop some uses of
cpudata->hw_prefcore
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Mario Limonciello <superm1@...nel.org>
> Sent: Tuesday, August 27, 2024 5:14 AM
> To: Borislav Petkov <bp@...en8.de>; Shenoy, Gautham Ranjal
> <gautham.shenoy@....com>; Yuan, Perry <Perry.Yuan@....com>
> Cc: maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT) <x86@...nel.org>;
> Rafael J . Wysocki <rafael@...nel.org>; open list:X86 ARCHITECTURE (32-BIT
> AND 64-BIT) <linux-kernel@...r.kernel.org>; open list:ACPI <linux-
> acpi@...r.kernel.org>; open list:CPU FREQUENCY SCALING FRAMEWORK
> <linux-pm@...r.kernel.org>; Limonciello, Mario
> <Mario.Limonciello@....com>
> Subject: [PATCH 8/8] cpufreq: amd-pstate: Drop some uses of cpudata-
> >hw_prefcore
>
> From: Mario Limonciello <mario.limonciello@....com>
>
> As the global variable is cleared when preferred cores is not present the local
> variable use isn't needed in many functions.
> Drop it where possible. No intended functional changes.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
> drivers/cpufreq/amd-pstate.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index ed05d7a0add10..257e28e549bd1 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1112,12 +1112,7 @@ static ssize_t
> show_amd_pstate_prefcore_ranking(struct cpufreq_policy *policy, static
> ssize_t show_amd_pstate_hw_prefcore(struct cpufreq_policy *policy,
> char *buf)
> {
> - bool hw_prefcore;
> - struct amd_cpudata *cpudata = policy->driver_data;
> -
> - hw_prefcore = READ_ONCE(cpudata->hw_prefcore);
> -
> - return sysfs_emit(buf, "%s\n", str_enabled_disabled(hw_prefcore));
> + return sysfs_emit(buf, "%s\n",
> +str_enabled_disabled(amd_pstate_prefcore));
> }
>
> static ssize_t show_energy_performance_available_preferences(
> --
> 2.43.0
>
Reviewed-by: Perry Yuan <perry.yuan@....com>
Best Regards.
Perry.
Powered by blists - more mailing lists