diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-07-17 16:15:04 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-07-25 08:53:53 -0600 |
commit | 8ee592a638fc246958acdb543acb42e76a72c5aa (patch) | |
tree | 17d345fbc0e0a4a9459d160794bc5327270cb3af /tools/testing/selftests/resctrl/mbm_test.c | |
parent | 7f3c980c7738d0624077f926216bc7ac4cefcf60 (diff) | |
download | linux-8ee592a638fc246958acdb543acb42e76a72c5aa.tar.gz linux-8ee592a638fc246958acdb543acb42e76a72c5aa.tar.bz2 linux-8ee592a638fc246958acdb543acb42e76a72c5aa.zip |
selftests/resctrl: Don't use variable argument list for ->setup()
struct resctrl_val_param has ->setup() function that accepts variable
argument list. All test cases use only 1 argument as input and it's
the struct resctrl_val_param pointer.
Instead of variable argument list, directly pass struct
resctrl_val_param pointer as the only parameter to ->setup().
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Tested-by: Shaopeng Tan (Fujitsu) <tan.shaopeng@fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/mbm_test.c')
-rw-r--r-- | tools/testing/selftests/resctrl/mbm_test.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index 2d58d4b8a918..c7de6f5977f6 100644 --- a/tools/testing/selftests/resctrl/mbm_test.c +++ b/tools/testing/selftests/resctrl/mbm_test.c @@ -86,16 +86,10 @@ static int check_results(size_t span) return ret; } -static int mbm_setup(int num, ...) +static int mbm_setup(struct resctrl_val_param *p) { - struct resctrl_val_param *p; - va_list param; int ret = 0; - va_start(param, num); - p = va_arg(param, struct resctrl_val_param *); - va_end(param); - /* Run NUM_OF_RUNS times */ if (p->num_of_runs >= NUM_OF_RUNS) return END_OF_TESTS; |