Skip to content

Commit a9c7a1a

Browse files
committed
tools/power turbostat: Remove redundant newlines from err(3) strings
err(3) supplies a newline at the end of the string. No need to end err(3) strings with '\n'. Signed-off-by: Len Brown <len.brown@intel.com>
1 parent b991074 commit a9c7a1a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tools/power/x86/turbostat/turbostat.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3150,7 +3150,7 @@ void get_perf_llc_stats(int cpu, struct llc_stats *llc)
31503150
actual_read_size = read(fd_llc_percpu[cpu], &r, expected_read_size);
31513151

31523152
if (actual_read_size == -1)
3153-
err(-1, "%s(cpu%d,) %d,,%ld\n", __func__, cpu, fd_llc_percpu[cpu], expected_read_size);
3153+
err(-1, "%s(cpu%d,) %d,,%ld", __func__, cpu, fd_llc_percpu[cpu], expected_read_size);
31543154

31553155
llc->references = r.llc.references;
31563156
llc->misses = r.llc.misses;
@@ -6134,7 +6134,7 @@ static int update_effective_str(bool startup)
61346134

61356135
pos = fgets(buf, 1024, fp);
61366136
if (!pos)
6137-
err(1, "%s: file read failed\n", PATH_EFFECTIVE_CPUS);
6137+
err(1, "%s: file read failed", PATH_EFFECTIVE_CPUS);
61386138

61396139
fclose(fp);
61406140

@@ -6151,7 +6151,7 @@ static void update_effective_set(bool startup)
61516151
update_effective_str(startup);
61526152

61536153
if (parse_cpu_str(cpu_effective_str, cpu_effective_set, cpu_effective_setsize))
6154-
err(1, "%s: cpu str malformat %s\n", PATH_EFFECTIVE_CPUS, cpu_effective_str);
6154+
err(1, "%s: cpu str malformat %s", PATH_EFFECTIVE_CPUS, cpu_effective_str);
61556155
}
61566156

61576157
void linux_perf_init(void);
@@ -6818,7 +6818,7 @@ int check_for_cap_sys_rawio(void)
68186818

68196819
free_and_exit:
68206820
if (cap_free(caps) == -1)
6821-
err(-6, "cap_free\n");
6821+
err(-6, "cap_free");
68226822

68236823
return ret;
68246824
}
@@ -7021,7 +7021,7 @@ static void probe_intel_uncore_frequency_cluster(void)
70217021
sprintf(path_base, "/sys/devices/system/cpu/intel_uncore_frequency/uncore%02d", i);
70227022

70237023
if (access(path_base, R_OK))
7024-
err(1, "%s: %s\n", __func__, path_base);
7024+
err(1, "%s: %s", __func__, path_base);
70257025

70267026
sprintf(path, "%s/package_id", path_base);
70277027
package_id = read_sysfs_int(path);

0 commit comments

Comments
 (0)