Skip to content

Commit 7bf7f22

Browse files
Perry Yuansuperm1
authored andcommitted
cpufreq: amd-pstate: remove unused variable nominal_freq
removed the unused variable `nominal_freq` for build warning. This variable was defined and assigned a value in the previous code, but it was not used in the subsequent code. Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Reported-by: kernel test robot <[email protected]> Signed-off-by: Perry Yuan <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Acked-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/b7ef41557f71d40d098393ddb27f0fe1f23648ae.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello <[email protected]>
1 parent 8f8b42c commit 7bf7f22

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ static int amd_pstate_init_freq(struct amd_cpudata *cpudata)
947947

948948
static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
949949
{
950-
int min_freq, max_freq, nominal_freq, ret;
950+
int min_freq, max_freq, ret;
951951
struct device *dev;
952952
struct amd_cpudata *cpudata;
953953

@@ -978,7 +978,6 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
978978

979979
min_freq = READ_ONCE(cpudata->min_freq);
980980
max_freq = READ_ONCE(cpudata->max_freq);
981-
nominal_freq = READ_ONCE(cpudata->nominal_freq);
982981

983982
policy->cpuinfo.transition_latency = amd_pstate_get_transition_latency(policy->cpu);
984983
policy->transition_delay_us = amd_pstate_get_transition_delay_us(policy->cpu);
@@ -1398,7 +1397,7 @@ static bool amd_pstate_acpi_pm_profile_undefined(void)
13981397

13991398
static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
14001399
{
1401-
int min_freq, max_freq, nominal_freq, ret;
1400+
int min_freq, max_freq, ret;
14021401
struct amd_cpudata *cpudata;
14031402
struct device *dev;
14041403
u64 value;
@@ -1431,7 +1430,6 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
14311430

14321431
min_freq = READ_ONCE(cpudata->min_freq);
14331432
max_freq = READ_ONCE(cpudata->max_freq);
1434-
nominal_freq = READ_ONCE(cpudata->nominal_freq);
14351433

14361434
policy->cpuinfo.min_freq = min_freq;
14371435
policy->cpuinfo.max_freq = max_freq;

0 commit comments

Comments
 (0)