[PATCH 2/2] cpufreq: fix fwts_set paths
Robert Elliott
elliott at hpe.com
Fri Jul 6 14:41:06 UTC 2018
Commit 5c782e1abfca ("lib: fwts_set: fix API for fwts_set, add fwts_set_int")
swapped the fwts_set() path and data arguments, resulting in the
cpufreq test creating these weird filenames, each containing the path
to the file it intended to write:
-rw-r--r--. 1 root root 55 Jul 3 15:14 'performance'$'\n'
-rw-r--r--. 1 root root 54 Jul 3 15:14 userspace
Fixes: 5c782e1abfca ("lib: fwts_set: fix API for fwts_set, add fwts_set_int")
Signed-off-by: Robert Elliott <elliott at hpe.com>
---
src/cpu/cpufreq/cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
index a65b9d08..ac8ce864 100644
--- a/src/cpu/cpufreq/cpufreq.c
+++ b/src/cpu/cpufreq/cpufreq.c
@@ -95,7 +95,7 @@ static int cpu_set_governor(fwts_framework *fw, struct cpu *cpu,
int rc;
cpu_mkpath(path, sizeof(path), cpu, "scaling_governor");
- rc = fwts_set(governor, path);
+ rc = fwts_set(path, governor);
if (rc != FWTS_OK)
goto out;
@@ -120,7 +120,7 @@ static int cpu_set_frequency(fwts_framework *fw, struct cpu *cpu,
cpu_mkpath(path, sizeof(path), cpu, "scaling_setspeed");
snprintf(buffer, sizeof(buffer), "%" PRIu64 , freq_hz);
- rc = fwts_set(buffer, path);
+ rc = fwts_set(path, buffer);
if (rc != FWTS_OK)
goto out;
--
2.14.3
More information about the fwts-devel
mailing list