cpuidle: governors: Drop redundant checks related to PM QoS
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 May 2018 11:41:09 +0000 (13:41 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 May 2018 21:13:00 +0000 (23:13 +0200)
PM_QOS_RESUME_LATENCY_NO_CONSTRAINT is defined as the 32-bit integer
maximum, so it is not necessary to test the return value of
dev_pm_qos_raw_read_value() against it directly in the menu and
ladder cpuidle governors.

Drop these redundant checks.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/ladder.c
drivers/cpuidle/governors/menu.c

index b24883f85c99543089d2035bfdf6226f589edb1b..060db5182bdb4723df237a468a30adb3abd6b69c 100644 (file)
@@ -76,8 +76,7 @@ static int ladder_select_state(struct cpuidle_driver *drv,
        int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
        int resume_latency = dev_pm_qos_raw_read_value(device);
 
-       if (resume_latency < latency_req &&
-           resume_latency != PM_QOS_RESUME_LATENCY_NO_CONSTRAINT)
+       if (resume_latency < latency_req)
                latency_req = resume_latency;
 
        /* Special case when user has set very strict latency requirement */
index 1bfe03ceb236c3cee8df46fc284f1cc17e30c9ec..5d15bc0ba2e09ec70b7f504f625267bf67e714e4 100644 (file)
@@ -302,8 +302,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
                data->needs_update = 0;
        }
 
-       if (resume_latency < latency_req &&
-           resume_latency != PM_QOS_RESUME_LATENCY_NO_CONSTRAINT)
+       if (resume_latency < latency_req)
                latency_req = resume_latency;
 
        /* Special case when user has set very strict latency requirement */