Skip to content

Commit 842c34a

Browse files
Liao Changrafaeljw
authored andcommitted
cpufreq: conservative: Simplify the condition of storing 'down_threshold'
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 <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 16a03c7 commit 842c34a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/cpufreq/cpufreq_conservative.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ static ssize_t down_threshold_store(struct gov_attr_set *attr_set,
187187
ret = sscanf(buf, "%u", &input);
188188

189189
/* cannot be lower than 1 otherwise freq will not fall */
190-
if (ret != 1 || input < 1 || input > 100 ||
191-
input >= dbs_data->up_threshold)
190+
if (ret != 1 || input < 1 || input >= dbs_data->up_threshold)
192191
return -EINVAL;
193192

194193
cs_tuners->down_threshold = input;

0 commit comments

Comments
 (0)