diff options
| author | Chaithanya Lagisetty <nagachaithanya9911@gmail.com> | 2026-09-04 05:20:33 +0000 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-11 09:35:43 -0700 |
| commit | 2023782431927239c61330792904eff96ab9c1dc (patch) | |
| tree | 5db5939f4db3b1d5a79c37b16834e1fe3308f205 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 25158cac2d15ae2a3ac1f8791094df9c6522efeb (diff) | |
KVM: selftests: Fix transposed calloc() arguments in the uffd helper
uffd_setup_demand_paging() passes the element size as the first argument
to calloc() and the element count as the second:
uffd_desc->pipefds = calloc(sizeof(int), num_readers);
calloc() expects the number of elements first and the size of each element
second. The product, and therefore the allocation size, is the same either
way, so this is not a functional change, but the arguments are misleading
and GCC 14 diagnoses them with -Wcalloc-transposed-args, which is enabled
by -Wextra.
Swap the arguments to match the calloc() prototype.
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
Reviewed-by: Gautam Menghani <gautam@linux.ibm.com>
Link: https://patch.msgid.link/20260904052033.3648259-1-nagachaithanya9911@gmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
