Re: [PATCH v4 1/2] cpufreq/amd-pstate: Pass the policy to amd_pstate_update()
From: Mario Limonciello
Date: Thu Apr 02 2026 - 09:59:42 EST
On 4/2/26 01:39, Viresh Kumar wrote:
On 02-04-26, 12:07, Viresh Kumar wrote:
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>
Oops, I already Acked it once :)
It is ready for Rafael to pick now.
I'm sending an amd-pstate PR later today after some more testing.
I'll pick this up in my PR that goes to Rafael.