Message ID | 20180706144106.56937-2-elliott@hpe.com |
---|---|
State | Accepted |
Headers | show |
Series | None | expand |
On 2018-07-06 07:41 AM, Robert Elliott wrote: > 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@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; > > Acked-by: Alex Hung <alex.hung@canonical.com>
On 06/07/18 15:41, Robert Elliott wrote: > 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@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; > > Acked-by: Colin Ian King <colin.king@canonical.com>
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;
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@hpe.com> --- src/cpu/cpufreq/cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)