diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-12-15 17:04:54 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-02-13 13:56:44 -0700 |
commit | 60c2a6926cc94dcd8a60ab593b4092bc354061c3 (patch) | |
tree | 9b61c329a4a3a9fa88203acc07a59edb819db9e9 /tools/testing/selftests/resctrl/resctrlfs.c | |
parent | 4b357e2a6d6c364a88d50526675fe596a30766cb (diff) |
selftests/resctrl: Mark get_cache_size() cache_type const
get_cache_size() does not modify cache_type so it could be const.
Mark cache_type const so that const char * can be passed to it. This
prevents warnings once many of the test parameters are marked const.
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/resctrlfs.c')
-rw-r--r-- | tools/testing/selftests/resctrl/resctrlfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c index a74be17eaa4e..1bbeb4dccf05 100644 --- a/tools/testing/selftests/resctrl/resctrlfs.c +++ b/tools/testing/selftests/resctrl/resctrlfs.c @@ -138,7 +138,7 @@ int get_resource_id(int cpu_no, int *resource_id) * * Return: = 0 on success, < 0 on failure. */ -int get_cache_size(int cpu_no, char *cache_type, unsigned long *cache_size) +int get_cache_size(int cpu_no, const char *cache_type, unsigned long *cache_size) { char cache_path[1024], cache_str[64]; int length, i, cache_num; |