linux/debian/patches/power-cpupower-fix-incorrec...

22 lines
790 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

commit 2fecc6ec4961703ea2c8936f3e37154399a56a68
Author: Mattia Dongili <malattia@linux.it>
Date: Sun Feb 14 11:55:43 2016 -0800
warning: comparison of constant -1 with boolean expression is always false
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