Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] `numaif.h` uses the `BITS_PER_TYPE` macro but does not include the header that defines it.
--
--- Patch [4]: [PATCH 4/5] KVM: selftests: add get_numa_mem_nodes() ---
commit 307e268608f2261ad345e9a86e81fdd51a53d40a
Author: Shivank Garg <[email protected]>
KVM: selftests: add get_numa_mem_nodes()
This patch moves the memory node query using MPOL_F_MEMS_ALLOWED from the
xAPIC IPI test into numaif.h as get_numa_mem_nodes(). This allows other
KVM selftests to use it directly instead of duplicating the logic.
> diff --git a/tools/testing/selftests/kvm/include/numaif.h b/tools/testing/selftests/kvm/include/numaif.h
> index 29572a6d789cd..55124e2330ab6 100644
> --- a/tools/testing/selftests/kvm/include/numaif.h
> +++ b/tools/testing/selftests/kvm/include/numaif.h
> @@ -75,6 +75,18 @@ static bool is_numa_available(void)
[ ... ]
> +static inline unsigned long get_numa_mem_nodes(void)
> +{
> + unsigned long nodemask = 0;
> +
> + /* Get set of first 64 numa nodes available */
> + if (get_mempolicy(NULL, &nodemask, BITS_PER_TYPE(nodemask), NULL,
> + MPOL_F_MEMS_ALLOWED))
[Severity: Low]
Does numaif.h need to include the header that defines BITS_PER_TYPE?
If a test includes numaif.h without previously including the header defining
this macro, it might fail to compile due to a missing definition, breaking
header self-containment.
> + return 0;
> +
> + return nodemask;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.