From: Palmer Cox
Date: Tue, 27 Nov 2012 12:17:47 +0000 (+0100) Subject: cpupower tools: Fix warning and a bug with the cpu package count X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~88^2~7^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea1021ffa65a81da3d393fcbd7509d6e40d4d325;p=pandora-kernel.git cpupower tools: Fix warning and a bug with the cpu package count The pkgs member of cpupower_topology is being used as the number of cpu packages. As the comment in get_cpu_topology notes, the package ids are not guaranteed to be contiguous. So, simply setting pkgs to the value of the highest physical_package_id doesn't actually provide a count of the number of cpu packages. Instead, calculate pkgs by setting it to the number of distinct physical_packge_id values which is pretty easy to do after the core_info structs are sorted. Calculating pkgs this way also has the nice benefit of getting rid of a sign comparison warning that GCC 4.6 was reporting. Signed-off-by: Palmer Cox
Signed-off-by: Thomas Renninger