util: fix sign comparison

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13074>
This commit is contained in:
Yiwei Zhang 2021-09-28 04:45:03 +00:00 committed by Marge Bot
parent 709e187003
commit 7c22ece8e4

View file

@ -497,8 +497,7 @@ get_cpu_topology(void)
*
* Loop over all possible CPUs even though some may be offline.
*/
for (unsigned i = 0; i < util_cpu_caps.max_cpus && i < UTIL_MAX_CPUS;
i++) {
for (int16_t i = 0; i < util_cpu_caps.max_cpus && i < UTIL_MAX_CPUS; i++) {
uint32_t cpu_bit = 1u << (i % 32);
mask[i / 32] = cpu_bit;