diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-12-15 17:04:59 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-02-13 13:56:44 -0700 |
commit | 33403bc7fe2ec35cd87e4f11db4d1a1da1e5ce12 (patch) | |
tree | 335447c8d50e6556f9144bc17d17e273fe05546a /tools/testing/selftests/resctrl/cat_test.c | |
parent | 5caf1b6400d30a31363063314bddea4e5680d639 (diff) |
selftests/resctrl: Remove unnecessary __u64 -> unsigned long conversion
Perf counters are __u64 but the code converts them to unsigned long
before printing them out.
Remove unnecessary type conversion and retain the perf originating
value as __u64.
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/testing/selftests/resctrl/cat_test.c')
-rw-r--r-- | tools/testing/selftests/resctrl/cat_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c index 0955f819bd83..516eaa08e967 100644 --- a/tools/testing/selftests/resctrl/cat_test.c +++ b/tools/testing/selftests/resctrl/cat_test.c @@ -41,12 +41,12 @@ static int cat_setup(struct resctrl_val_param *p) return ret; } -static int show_results_info(unsigned long sum_llc_val, int no_of_bits, +static int show_results_info(__u64 sum_llc_val, int no_of_bits, unsigned long cache_span, unsigned long max_diff, unsigned long max_diff_percent, unsigned long num_of_runs, bool platform) { - unsigned long avg_llc_val = 0; + __u64 avg_llc_val = 0; float diff_percent; int ret; @@ -68,8 +68,8 @@ static int show_results_info(unsigned long sum_llc_val, int no_of_bits, static int check_results(struct resctrl_val_param *param, size_t span) { char *token_array[8], temp[512]; - unsigned long sum_llc_perf_miss = 0; int runs = 0, no_of_bits = 0; + __u64 sum_llc_perf_miss = 0; FILE *fp; ksft_print_msg("Checking for pass/fail\n"); @@ -93,7 +93,7 @@ static int check_results(struct resctrl_val_param *param, size_t span) * setup transition phase. */ if (runs > 0) - sum_llc_perf_miss += strtoul(token_array[3], NULL, 0); + sum_llc_perf_miss += strtoull(token_array[3], NULL, 0); runs++; } |