]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/resctrl: Use correct type for pids
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 10 Jun 2024 15:14:46 +0000 (18:14 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Jul 2024 17:23:53 +0000 (11:23 -0600)
commit8245a70edad18e5eba479c5ea91beb590590b237
treec00242cd73d598fea1520f0a7f6294ad3d87d971
parent9224db5180f244f169fb81a3c88c48bf612ba238
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>
tools/testing/selftests/resctrl/cache.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_val.c
tools/testing/selftests/resctrl/resctrlfs.c