Re: [PATCH v4 1/2] cpufreq/amd-pstate: Pass the policy to amd_pstate_update()
From: Viresh Kumar
Date: Thu Apr 02 2026 - 02:44:31 EST
On 16-03-26, 08:18, K Prateek Nayak wrote:
> All callers of amd_pstate_update() already have a reference to the
> cpufreq_policy object.
>
> Pass the entire policy object and grab the cpudata using
> "policy->driver_data" instead of passing the cpudata and unnecessarily
> grabbing another read-side reference to the cpufreq policy object when
> it is already available in the caller.
>
> No functional changes intended.
>
> Reviewed-by: Mario Limonciello (AMD) <superm1@xxxxxxxxxx>
> Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> Signed-off-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> ---
> changelog v3..v4:
>
> o No changes.
> ---
> drivers/cpufreq/amd-pstate.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
--
viresh