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

21 lines
817 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.

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