Skip to content

Commit 5c3fd1e

Browse files
Perry Yuanrafaeljw
authored andcommitted
cpufreq: amd-pstate: remove unused variable lowest_nonlinear_freq
removed the unused variable `lowest_nonlinear_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. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Perry Yuan <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 5131a3c commit 5c3fd1e

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
@@ -878,7 +878,7 @@ static int amd_pstate_init_freq(struct amd_cpudata *cpudata)
878878

879879
static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
880880
{
881-
int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
881+
int min_freq, max_freq, nominal_freq, ret;
882882
struct device *dev;
883883
struct amd_cpudata *cpudata;
884884

@@ -910,7 +910,6 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
910910
min_freq = READ_ONCE(cpudata->min_freq);
911911
max_freq = READ_ONCE(cpudata->max_freq);
912912
nominal_freq = READ_ONCE(cpudata->nominal_freq);
913-
lowest_nonlinear_freq = READ_ONCE(cpudata->lowest_nonlinear_freq);
914913

915914
if (min_freq <= 0 || max_freq <= 0 ||
916915
nominal_freq <= 0 || min_freq > max_freq) {
@@ -1339,7 +1338,7 @@ static bool amd_pstate_acpi_pm_profile_undefined(void)
13391338

13401339
static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
13411340
{
1342-
int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
1341+
int min_freq, max_freq, nominal_freq, ret;
13431342
struct amd_cpudata *cpudata;
13441343
struct device *dev;
13451344
u64 value;
@@ -1373,7 +1372,6 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
13731372
min_freq = READ_ONCE(cpudata->min_freq);
13741373
max_freq = READ_ONCE(cpudata->max_freq);
13751374
nominal_freq = READ_ONCE(cpudata->nominal_freq);
1376-
lowest_nonlinear_freq = READ_ONCE(cpudata->lowest_nonlinear_freq);
13771375
if (min_freq <= 0 || max_freq <= 0 ||
13781376
nominal_freq <= 0 || min_freq > max_freq) {
13791377
dev_err(dev,

0 commit comments

Comments
 (0)