Re: [PATCH 6/6] cpupower tools: Fix warning and a bug with the cpu package count

2012-08-09 Thread Palmer Cox
On Thu, Aug 09, 2012 at 12:07:36PM +0200, Thomas Renninger wrote: > On Tuesday 07 August 2012 04:24:48 Palmer Cox wrote: > > 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 > &g

Re: [PATCH 6/6] cpupower tools: Fix warning and a bug with the cpu package count

2012-08-09 Thread Palmer Cox
On Thu, Aug 09, 2012 at 12:07:36PM +0200, Thomas Renninger wrote: On Tuesday 07 August 2012 04:24:48 Palmer Cox wrote: 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

[PATCH 5/6] cpupower tools: Fix malloc of cpu_info structure

2012-08-06 Thread Palmer Cox
The cpu_info member of cpupower_topology was being declared as an unnamed structure. This member was then being malloced using the size of the parent cpupower_topology * the number of cpus. This works because cpu_info is smaller than cpupower_topology. However, there is no guarantee that will

[PATCH 6/6] cpupower tools: Fix warning and a bug with the cpu package count

2012-08-06 Thread Palmer Cox
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

[PATCH 4/6] cpupower tools: Fix issues with sysfs_topology_read_file

2012-08-06 Thread Palmer Cox
Fix a variety of issues with sysfs_topology_read_file: * The return value of sysfs_topology_read_file function was not properly being checked for failure. * The function was reading int valued sysfs variables and then returning their value. So, even if a function was trying to check the return

[PATCH 3/6] cpupower tools: Fix minor warnings

2012-08-06 Thread Palmer Cox
Fix minor warnings reported with GCC 4.6: * The sysfs_write_file function is unused - remove it. * The pr_mon_len in the print_header function is unsed - remove it. --- tools/power/cpupower/utils/helpers/sysfs.c | 19 ---

[PATCH 2/6] cpupower tools: Update .gitignore for files created in the debug directories

2012-08-06 Thread Palmer Cox
The files generated by the Makefiles in the debug directories aren't listed in the .gitignore file in the root of the cpupower tool which causes these files to show up in the output of 'git status'. --- tools/power/cpupower/.gitignore |7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 0/6] cpupower tools: Fix minor bugs and warnings

2012-08-06 Thread Palmer Cox
which I believe also fixes an issue that would arrise if the package id values are non-contiguous on a particular system. Palmer Cox (6): cpupower tools: Remove brace expansion from clean target cpupower tools: Update .gitignore for files created in the debug directories cpupower

[PATCH 1/6] cpupower tools: Remove brace expansion from clean target

2012-08-06 Thread Palmer Cox
The clean targets from the cpupower tools' Makefiles use brace expansion to remove some generated files. However, the default shells on many systems do not support this feature resulting in some generated files not being removed by clean. --- tools/power/cpupower/Makefile|3 ++-

[PATCH 1/6] cpupower tools: Remove brace expansion from clean target

2012-08-06 Thread Palmer Cox
The clean targets from the cpupower tools' Makefiles use brace expansion to remove some generated files. However, the default shells on many systems do not support this feature resulting in some generated files not being removed by clean. --- tools/power/cpupower/Makefile|3 ++-

[PATCH 0/6] cpupower tools: Fix minor bugs and warnings

2012-08-06 Thread Palmer Cox
which I believe also fixes an issue that would arrise if the package id values are non-contiguous on a particular system. Palmer Cox (6): cpupower tools: Remove brace expansion from clean target cpupower tools: Update .gitignore for files created in the debug directories cpupower

[PATCH 2/6] cpupower tools: Update .gitignore for files created in the debug directories

2012-08-06 Thread Palmer Cox
The files generated by the Makefiles in the debug directories aren't listed in the .gitignore file in the root of the cpupower tool which causes these files to show up in the output of 'git status'. --- tools/power/cpupower/.gitignore |7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 3/6] cpupower tools: Fix minor warnings

2012-08-06 Thread Palmer Cox
Fix minor warnings reported with GCC 4.6: * The sysfs_write_file function is unused - remove it. * The pr_mon_len in the print_header function is unsed - remove it. --- tools/power/cpupower/utils/helpers/sysfs.c | 19 ---

[PATCH 4/6] cpupower tools: Fix issues with sysfs_topology_read_file

2012-08-06 Thread Palmer Cox
Fix a variety of issues with sysfs_topology_read_file: * The return value of sysfs_topology_read_file function was not properly being checked for failure. * The function was reading int valued sysfs variables and then returning their value. So, even if a function was trying to check the return

[PATCH 6/6] cpupower tools: Fix warning and a bug with the cpu package count

2012-08-06 Thread Palmer Cox
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

[PATCH 5/6] cpupower tools: Fix malloc of cpu_info structure

2012-08-06 Thread Palmer Cox
The cpu_info member of cpupower_topology was being declared as an unnamed structure. This member was then being malloced using the size of the parent cpupower_topology * the number of cpus. This works because cpu_info is smaller than cpupower_topology. However, there is no guarantee that will

[tip:perf/urgent] perf tools: Remove brace expansion from clean target

2012-08-05 Thread tip-bot for Palmer Cox
Commit-ID: 7f309ed6453926a81e2a97d274f67f1e48f0d74c Gitweb: http://git.kernel.org/tip/7f309ed6453926a81e2a97d274f67f1e48f0d74c Author: Palmer Cox AuthorDate: Sun, 29 Jul 2012 17:54:43 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 3 Aug 2012 10:46:32 -0300 perf tools

[tip:perf/urgent] perf tools: Remove brace expansion from clean target

2012-08-05 Thread tip-bot for Palmer Cox
Commit-ID: 7f309ed6453926a81e2a97d274f67f1e48f0d74c Gitweb: http://git.kernel.org/tip/7f309ed6453926a81e2a97d274f67f1e48f0d74c Author: Palmer Cox p...@lmercox.com AuthorDate: Sun, 29 Jul 2012 17:54:43 -0400 Committer: Arnaldo Carvalho de Melo a...@redhat.com CommitDate: Fri, 3 Aug 2012

[PATCH] perf: Remove brace expansion from clean target

2012-07-29 Thread Palmer Cox
The clean target uses brace expansion to remove some generated files. However, the default shells on many systems do not support this feature resulting in some generated files not being removed by clean. Signed-off-by: Palmer Cox --- tools/perf/Makefile |3 ++- 1 file changed, 2 insertions

[PATCH] perf: Remove brace expansion from clean target

2012-07-29 Thread Palmer Cox
The clean target uses brace expansion to remove some generated files. However, the default shells on many systems do not support this feature resulting in some generated files not being removed by clean. Signed-off-by: Palmer Cox p...@lmercox.com --- tools/perf/Makefile |3 ++- 1 file