diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2024-06-10 18:14:46 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-07-11 11:23:53 -0600 |
commit | 8245a70edad18e5eba479c5ea91beb590590b237 (patch) | |
tree | c00242cd73d598fea1520f0a7f6294ad3d87d971 /tools/testing/selftests/resctrl/resctrl.h | |
parent | 9224db5180f244f169fb81a3c88c48bf612ba238 (diff) |
selftests/resctrl: Use correct type for pids
A few functions receive PIDs through int arguments. PIDs variables
should be of type pid_t, not int.
Convert pid arguments from int to pid_t.
Before printing PID, match the type to %d by casting to int which is
enough for Linux (standard would allow using a longer integer type but
generalizing for that would complicate the code unnecessarily, the
selftest code does not need to be portable).
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrl.h')
-rw-r--r-- | tools/testing/selftests/resctrl/resctrl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h index 00d51fa7531c..e6f221236c79 100644 --- a/tools/testing/selftests/resctrl/resctrl.h +++ b/tools/testing/selftests/resctrl/resctrl.h @@ -174,8 +174,8 @@ void perf_event_initialize_read_format(struct perf_event_read *pe_read); int perf_open(struct perf_event_attr *pea, pid_t pid, int cpu_no); int perf_event_reset_enable(int pe_fd); int perf_event_measure(int pe_fd, struct perf_event_read *pe_read, - const char *filename, int bm_pid); -int measure_llc_resctrl(const char *filename, int bm_pid); + const char *filename, pid_t bm_pid); +int measure_llc_resctrl(const char *filename, pid_t bm_pid); void show_cache_info(int no_of_bits, __u64 avg_llc_val, size_t cache_span, bool lines); /* |