21 lines
817 B
Diff
21 lines
817 B
Diff
From: Mattia Dongili <malattia@linux.it>
|
||
Date: Sun, 14 Feb 2016 19:55:43 +0000
|
||
Subject: warning: comparison of constant ‘-1’ with boolean expression is always false
|
||
Forwarded: http://article.gmane.org/gmane.linux.power-management.general/73193
|
||
|
||
Signed-off-by: Mattia Dongili <malattia@linux.it>
|
||
---
|
||
diff --git a/tools/power/cpupower/utils/helpers/topology.c b/tools/power/cpupower/utils/helpers/topology.c
|
||
index 9cbb7fd..771ec60 100644
|
||
--- a/tools/power/cpupower/utils/helpers/topology.c
|
||
+++ b/tools/power/cpupower/utils/helpers/topology.c
|
||
@@ -106,7 +106,7 @@ int get_cpu_topology(struct cpupower_topology *cpu_top)
|
||
cpu_top->pkgs++;
|
||
}
|
||
}
|
||
- if (!cpu_top->core_info[0].pkg == -1)
|
||
+ if (cpu_top->core_info[0].pkg != -1)
|
||
cpu_top->pkgs++;
|
||
|
||
/* Intel's cores count is not consecutively numbered, there may
|