cpufreq: conservative: Simplify the condition of storing 'down_threshold'

JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 842c34a2668f68ebe15d0fc9dc19d33733bb428d
Author: Liao Chang <liaochang1@huawei.com>
Date: Fri, 06 Oct 2023 21:55:13 +0000

The governor currently checks if the input new down_threshold is less
than 100 before storing it, but the up_threshold field of dbs_data
structure is also limited to be less than 100, so this check is
unnecessary and remove it.

Signed-off-by: Liao Chang <liaochang1@huawei.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
This commit is contained in:
Mark Langsdorf 2024-04-25 11:50:25 -04:00
parent 8cf3b4394d
commit 7f0822f10e
1 changed files with 1 additions and 2 deletions

View File

@ -187,8 +187,7 @@ static ssize_t down_threshold_store(struct gov_attr_set *attr_set,
ret = sscanf(buf, "%u", &input);
/* cannot be lower than 1 otherwise freq will not fall */
if (ret != 1 || input < 1 || input > 100 ||
input >= dbs_data->up_threshold)
if (ret != 1 || input < 1 || input >= dbs_data->up_threshold)
return -EINVAL;
cs_tuners->down_threshold = input;