浏览代码

[CPUFREQ] Remove pointless check in conservative governor.

< 0 checks on unsigned variables are pointless.

Signed-off-by: Dave Jones <davej@redhat.com>
Dave Jones 19 年之前
父节点
当前提交
b82fbe6c42
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      drivers/cpufreq/cpufreq_conservative.c

+ 2 - 4
drivers/cpufreq/cpufreq_conservative.c

@@ -176,8 +176,7 @@ static ssize_t store_up_threshold(struct cpufreq_policy *unused,
 	ret = sscanf (buf, "%u", &input);
 
 	mutex_lock(&dbs_mutex);
-	if (ret != 1 || input > 100 || input < 0 ||
-			input <= dbs_tuners_ins.down_threshold) {
+	if (ret != 1 || input > 100 || input <= dbs_tuners_ins.down_threshold) {
 		mutex_unlock(&dbs_mutex);
 		return -EINVAL;
 	}
@@ -196,8 +195,7 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused,
 	ret = sscanf (buf, "%u", &input);
 
 	mutex_lock(&dbs_mutex);
-	if (ret != 1 || input > 100 || input < 0 ||
-			input >= dbs_tuners_ins.up_threshold) {
+	if (ret != 1 || input > 100 || input >= dbs_tuners_ins.up_threshold) {
 		mutex_unlock(&dbs_mutex);
 		return -EINVAL;
 	}