aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/resctrl/cache.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-07-17 16:15:00 +0300
committerShuah Khan <skhan@linuxfoundation.org>2023-07-25 08:53:29 -0600
commit326baed260e2e4f2df18d42d41b261740c6b8c04 (patch)
tree9ff7bb550dcaa55518dab522a442ac6b6f9edee2 /tools/testing/selftests/resctrl/cache.c
parentselftests/resctrl: Remove duplicated preparation for span arg (diff)
downloadlinux-326baed260e2e4f2df18d42d41b261740c6b8c04.tar.gz
linux-326baed260e2e4f2df18d42d41b261740c6b8c04.zip
selftests/resctrl: Remove "malloc_and_init_memory" param from run_fill_buf()
run_fill_buf()'s malloc_and_init_memory parameter is always 1. There's also duplicated memory init code for malloc_and_init_memory == 0 case in fill_buf() which is unused. Remove the malloc_and_init_memory parameter and the duplicated mem init code. While at it, fix also a typo in run_fill_buf() prototype's argument. 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/cache.c')
-rw-r--r--tools/testing/selftests/resctrl/cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c
index 53df66814cd6..63b551c44f1d 100644
--- a/tools/testing/selftests/resctrl/cache.c
+++ b/tools/testing/selftests/resctrl/cache.c
@@ -210,7 +210,7 @@ int measure_cache_vals(struct resctrl_val_param *param, int bm_pid)
*/
int cat_val(struct resctrl_val_param *param)
{
- int malloc_and_init_memory = 1, memflush = 1, operation = 0, ret = 0;
+ int memflush = 1, operation = 0, ret = 0;
char *resctrl_val = param->resctrl_val;
pid_t bm_pid;
@@ -247,8 +247,8 @@ int cat_val(struct resctrl_val_param *param)
if (ret)
break;
- if (run_fill_buf(param->span, malloc_and_init_memory,
- memflush, operation, resctrl_val)) {
+ if (run_fill_buf(param->span, memflush, operation,
+ resctrl_val)) {
fprintf(stderr, "Error-running fill buffer\n");
ret = -1;
goto pe_close;