summaryrefslogtreecommitdiff
path: root/tools/power/cpupower/bench/system.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2011-04-19 17:20:12 (GMT)
committerDominik Brodowski <linux@dominikbrodowski.net>2011-07-29 16:35:38 (GMT)
commit02af3cb5aac13d8ef7edb7876260564b7d42ad2b (patch)
tree6e5294ee57cb10340bd31301e7b38a29d4a6a054 /tools/power/cpupower/bench/system.c
parentf5ac0641d129348399a8f39c95e7a16dc6e19f53 (diff)
downloadlinux-02af3cb5aac13d8ef7edb7876260564b7d42ad2b.tar.xz
cpupowerutils: bench - ConfigStyle bugfixes
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'tools/power/cpupower/bench/system.c')
-rw-r--r--tools/power/cpupower/bench/system.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/power/cpupower/bench/system.c b/tools/power/cpupower/bench/system.c
index 3e3a82e..f01e3f4 100644
--- a/tools/power/cpupower/bench/system.c
+++ b/tools/power/cpupower/bench/system.c
@@ -31,7 +31,7 @@
#include "system.h"
/**
- * returns time since epoch in µs
+ * returns time since epoch in µs
*
* @retval time
**/
@@ -87,7 +87,7 @@ int set_cpufreq_governor(char *governor, unsigned int cpu)
int set_cpu_affinity(unsigned int cpu)
{
cpu_set_t cpuset;
-
+
CPU_ZERO(&cpuset);
CPU_SET(cpu, &cpuset);
@@ -129,7 +129,7 @@ int set_process_priority(int priority)
}
/**
- * notifys the user that the benchmark may run some time
+ * notifies the user that the benchmark may run some time
*
* @param config benchmark config values
*
@@ -142,8 +142,11 @@ void prepare_user(const struct config *config)
unsigned int round;
for (round = 0; round < config->rounds; round++) {
- sleep_time += 2 * config->cycles * (config->sleep + config->sleep_step * round);
- load_time += 2 * config->cycles * (config->load + config->load_step * round) + (config->load + config->load_step * round * 4);
+ sleep_time += 2 * config->cycles *
+ (config->sleep + config->sleep_step * round);
+ load_time += 2 * config->cycles *
+ (config->load + config->load_step * round) +
+ (config->load + config->load_step * round * 4);
}
if (config->verbose || config->output != stdout)