diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-12-15 17:04:52 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-02-13 13:56:43 -0700 |
commit | 24be05591fb7a2a3edd639092c045298dd57aeea (patch) | |
tree | 54e63e6eb0dd6fa433a2f35507f2e2ad61517b78 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | f8f669699977db503569465b64dc5220ab21bb41 (diff) | |
download | linux-24be05591fb7a2a3edd639092c045298dd57aeea.tar.gz linux-24be05591fb7a2a3edd639092c045298dd57aeea.tar.bz2 linux-24be05591fb7a2a3edd639092c045298dd57aeea.zip |
selftests/resctrl: Refactor fill_buf functions
There are unnecessary nested calls in fill_buf.c:
- run_fill_buf() calls fill_cache()
- alloc_buffer() calls malloc_and_init_memory()
Simplify the code flow and remove those unnecessary call levels by
moving the called code inside the calling function and remove the
duplicated error print.
Resolve the difference in run_fill_buf() and fill_cache() parameter
name into 'buf_size' which is more descriptive than 'span'. Also, while
moving the allocation related code, rename 'p' into 'buf' to be
consistent in naming the variables.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions