Home
last modified time | relevance | path

Searched hist:ae9b4197a56f422d4ceb30237c2cfaea6871802a (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/arch/arm/mm/
H A Dtee_pager.cae9b4197a56f422d4ceb30237c2cfaea6871802a Wed May 22 15:32:28 UTC 2024 Gatien Chevallier <gatien.chevallier@foss.st.com> core: pager: fix arguments passed to calloc in alloc_merged_pgt_array()

An error was reported when compiling with GCC14 on this calloc:

core/arch/arm/mm/tee_pager.c: In function 'alloc_merged_pgt_array':
core/arch/arm/mm/tee_pager.c:934:35: warning: 'calloc' sizes specified
with 'sizeof' in the earlier argument and not in the later argument
[-Wcalloc-transposed-args]
934 | pgt_array = calloc(sizeof(struct pgt *), pgt_count);
| ^~~~~~

Looking at the code, it seems that pgt_count and sizeof(struct pgt *)
are inverted.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Fixes: 60e367146042 ("core: pager fix alloc_merged_pgt_array()")
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>