瀏覽代碼

cpuidle: power_usage should be declared signed integer

power_usage is always assigned a negative value and should be declared
a signed integer

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Boris Ostrovsky 13 年之前
父節點
當前提交
02401c06b7
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      drivers/cpuidle/governors/menu.c
  2. 1 1
      include/linux/cpuidle.h

+ 1 - 1
drivers/cpuidle/governors/menu.c

@@ -236,7 +236,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
 {
 {
 	struct menu_device *data = &__get_cpu_var(menu_devices);
 	struct menu_device *data = &__get_cpu_var(menu_devices);
 	int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
 	int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
-	unsigned int power_usage = -1;
+	int power_usage = -1;
 	int i;
 	int i;
 	int multiplier;
 	int multiplier;
 	struct timespec t;
 	struct timespec t;

+ 1 - 1
include/linux/cpuidle.h

@@ -44,7 +44,7 @@ struct cpuidle_state {
 
 
 	unsigned int	flags;
 	unsigned int	flags;
 	unsigned int	exit_latency; /* in US */
 	unsigned int	exit_latency; /* in US */
-	unsigned int	power_usage; /* in mW */
+	int		power_usage; /* in mW */
 	unsigned int	target_residency; /* in US */
 	unsigned int	target_residency; /* in US */
 	unsigned int    disable;
 	unsigned int    disable;